Repository navigation
Description
Describe the bug
Reissuing the sidecar injector's client certificate causes CNPG plugin communication to fail with:
tls: unknown certificate authority
Affected clusters enter:
Cluster cannot proceed to reconciliation due to an error while interacting with plugins
Existing database pods may continue running, but reconciliation is blocked. Newly created clusters remain stuck with zero database pods.
To Reproduce
-
Install the DocumentDB Operator Helm chart with cert-manager and the sidecar injector enabled.
-
Deploy a single-node DocumentDB cluster and wait until it becomes healthy. The tested cluster was named
documentdb-e2ein namespacedocumentdb-e2e. -
Reissue the plugin client certificate by changing its duration from the chart's default
2160h:kubectl -n cnpg-system patch certificate sidecarinjector-client \ --type=merge \ -p '{"spec":{"duration":"2159h"}}' -
Wait for the certificate's
.status.revisionto increase. In the reproduction, it changed from1to2. -
Trigger cluster reconciliation:
kubectl -n documentdb-e2e annotate cluster documentdb-e2e \ reproduction/reconcile="$(date +%s)" --overwrite -
Inspect the backing CNPG Cluster:
kubectl -n documentdb-e2e get cluster documentdb-e2e \ -o jsonpath='{.status.phase}{"\n"}{.status.phaseReason}{"\n"}' -
Optionally deploy another DocumentDB resource with a different name. Its backing CNPG Cluster enters the same error phase before creating any database pods.
Expected behavior
Plugin communication and cluster reconciliation should continue after certificate renewal, without manually restarting the injector.
New clusters should initialize normally.
Screenshots
Relevant error output:
Error while discovering plugins: while getting plugin connection:
while querying plugin identity: rpc error: code = Unavailable
desc = connection error:
desc = "error reading server preface:
remote error: tls: unknown certificate authority"
Kubernetes Environment (please complete the following information):
- DocumentDB Operator Version: source commit
9b0dd5e15f638cb4fa19c76f5470edec34d05f60/ PR refactoring: product neutral operator core #482 - Kubernetes Version:
v1.35.0 - Kubernetes Environment: single-node kind, emulated Linux AMD64 using QEMU on an ARM Mac
- Cert Bot Version: cert-manager
v1.15.3 - CNPG Version:
1.29.1, installed through the operator Helm chart - Container runtime: containerd
2.2.0
Additional context
Before certificate reissuance, cluster startup, strict hostname-verified TLS, SCRAM authentication and CRUD all passed.
The shared TLS helper in cnpg-i-machinery v0.2.0 loads the plugin client trust certificate into memory at server startup. The running injector retains that trust after certificate reissuance.
The relevant helper dependency, plugin TLS wiring and certificate templates are unchanged between PR #482's base commit ee41fd9 and the tested head.
Verified workaround
kubectl -n cnpg-system rollout restart deployment/sidecar-injector
kubectl -n cnpg-system rollout status deployment/sidecar-injectorRestarting only the injector restored reconciliation for both the existing cluster and the previously podless cluster. Original data remained accessible, and strict TLS, authentication and CRUD passed afterward.
A failing CI run also showed plugin client certificate revisions 1 and 2 and the same zero-pod symptom. However, that run omitted the detailed CNPG/plugin logs, so its exact cause is not conclusively established.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsBacklog
Activity
documentdb-triage-tool commentedon Nov 12, 2026
👋 @xgerman — this issue has been assigned for 14 days with no activity. Is it still in progress? If you've made progress, please leave a quick update. Otherwise it'll be flagged for re-assignment at the next triage meeting.
documentdb-triage-tool commentedon Nov 12, 2026
🤖 Auto-triaged by documentdb-triage-tool.
Applied:
go,bugProject fields suggested: Component
controllers· PriorityP1· EffortL· StatusIn ProgressConfidence: 0.82 (llm)
Reasoning
LLM: TLS certificate renewal causes CNPG plugin communication to break and blocks all cluster reconciliation (including zero-pod new clusters) until a manual sidecar injector restart — an active blocker for any cert-manager-enabled deployment.
If a label is wrong, ping
@patty-chowso the rules can be tuned. Issues with component labels are left alone; PR component labels are reconciled from changed paths on every run.