Repository navigation
Description
Pre-submission checklist
- I have searched existing issues and confirmed this is not a duplicate.
Description
The controller loads the CA it uses to verify kargo-api's TLS certificate once and never reloads it:
pkg/client/apiserver/client.go(NewAPIClient) readsAPI_SERVER_CA_CERT_PATHand builds the transport'sRootCAsonce, when the client is created.charts/kargo/templates/controller/deployment.yamlmounts that file withsubPath: ca.crt. The kubelet never updatessubPathmounts, so the file on disk stays stale too.
With the chart defaults (api.tls.enabled: true, api.tls.selfSignedCert: true), the kargo-api certificate is self-signed, so its ca.crt changes on every renewal (about every 60 days). After a renewal, kargo-api serves a certificate the controller no longer trusts, and every controller request to the API fails TLS verification until the controller restarts.
#8092 issues the chart's certificates from a shared, long-lived CA, so ca.crt stays the same across renewals. That removes the recurring failure, but the controller can still be left with a stale CA:
- during the upgrade that switches the
kargo-apiCertificate to the new issuer, if the controller starts before the certificate is reissued; - whenever the CA itself changes, or a user-provided certificate is rotated to a different CA.
This is the same class of problem as #6866 (kargo-api trusting Dex, fixed in #8091) and #8238 (serving certificates).
Raised in review of #8092 (#8092 (comment)).
Steps to Reproduce
- Install the chart from
mainwith the defaults (self-signed API certificate). - Force cert-manager to reissue the
kargo-apiCertificate, e.g. by deleting its Secret. - Watch the controller's requests to the API server. They fail with
x509: certificate signed by unknown authorityuntil the controller Pod restarts.
Expected Behavior
The controller picks up a changed CA without a restart: the chart mounts the Secret without subPath, so the kubelet updates the file, and the client re-reads the CA, as dex.NewTransport (#8091) does for Dex.
Actual Behavior
The controller keeps the CA it loaded at startup and cannot reach kargo-api after the CA changes until the Pod restarts.
Kargo Version
main (unreleased; the controller-to-API client is not in any release branch)
Activity
kargo-governance-bot commentedon Dec 4, 2026
Before Starting Work
Thank you for opening this issue.
Please do not start work on this issue, and please do not ask to be assigned to it, until a maintainer has triaged it and cleared it for contribution. This applies to bug reports too. A maintainer needs to confirm a bug, and usually reproduce it, before a fix is worth writing.
An issue is cleared for contribution when none of the blocking labels remain on it. Pull requests that reference an issue that has not been cleared are automatically converted to drafts, which maintainers do not routinely review.
Maintainers triage issues on a best-effort basis. See the Contributor Guide for details.