Operator silently swallows the client-certificate provisioning error

Open Beginner friendly
#370 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
go, kubernetes
Domain
backend, devops

Research direction

Start in internal/controller/etcdcluster_controller.go at fetchAndValidateState around line 138, and trace how createClientCertificate errors are handled. Add the unit test described with a fake client that fails Certificate creation, then verify the reconcile result requeues instead of proceeding and that the existing success path remains intact.

Written by the indexing model from the issue text.

Description

Problem

In fetchAndValidateState (internal/controller/etcdcluster_controller.go:138), a failure from createClientCertificate is logged and then swallowed — the reconcile proceeds as if the client certificate exists. When provisioning genuinely fails (issuer not ready, RBAC, transient API error), the operator continues without a usable client cert, the error never surfaces in status, and any subsequent cert-dependent operation fails downstream with a less obvious symptom.

Proposed fix

On createClientCertificate failure, requeue with backoff (ctrl.Result{RequeueAfter: ...}) instead of logging-and-proceeding, so provisioning is retried and the cluster converges once the issuer is ready.

Small, self-contained change (~8 lines) with a unit test (fake client fails the Certificate create → assert requeue, not proceed). I'd like to send a PR for this.

Dominant language
Go
Stars
164
Forks
72
Avg merge
21h 20m
Merged PRs (30d)
33

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from etcd-io/etcd-operator

All issues in etcd-io/etcd-operator

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.