Skip to content

fix(keda): don't gate cert rotation on metrics server being enabled#852

Open
zammitjohn wants to merge 1 commit into
kedacore:mainfrom
zammitjohn:fix/cert-rotation-gated-on-metrics-server
Open

fix(keda): don't gate cert rotation on metrics server being enabled#852
zammitjohn wants to merge 1 commit into
kedacore:mainfrom
zammitjohn:fix/cert-rotation-gated-on-metrics-server

Conversation

@zammitjohn
Copy link
Copy Markdown

@zammitjohn zammitjohn commented May 6, 2026

PR #819 added .Values.metricsServer.enabled to the --enable-cert-rotation gate in keda/templates/manager/deployment.yaml. As a result, setting metricsServer.enabled=false also disables cert rotation for the operator and admission webhooks, so the kedaorg-certs secret is never created.

Symptoms reported in #849:

  • KEDA operator crashloops: open /certs/ca.crt: no such file or directory
  • Admission webhooks stuck in ContainerCreating: MountVolume.SetUp failed for volume "certificates": secret "kedaorg-certs" not found
  • ScaledJobs never start because the operator never becomes ready

This restores the pre-#819 expression so cert rotation is gated only on autoGenerated and !certManager.enabled, independent of the metrics server. The metrics server's own deployment and APIService are still gated separately by {{- if .Values.metricsServer.enabled }}, so disabling it continues to work as intended.

Verified via helm template:

Config Before After
defaults true true
metricsServer.enabled=false false (bug) true
certManager.enabled=true false false
certificates.autoGenerated=false false false

Checklist

  • I have verified that my change is according to the deprecations & breaking changes policy
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • README is updated with new configuration values (if applicable) learn more
  • A PR is opened to update KEDA core (repo) (if applicable, ie. when deployment manifests are modified)

Fixes #849

PR kedacore#819 added .Values.metricsServer.enabled to the --enable-cert-rotation
gate, which means setting metricsServer.enabled=false also disables cert
rotation for the operator and admission webhooks. The kedaorg-certs secret
is then never created, leaving the operator crashlooping on missing
/certs/ca.crt and webhooks stuck in ContainerCreating.

Restore the pre-kedacore#819 expression so cert rotation is gated only on
autoGenerated and !certManager.enabled, independent of the metrics server.

Fixes kedacore#849

Signed-off-by: John Zammit <john.zammit@invicti.com>
@zammitjohn zammitjohn requested review from a team as code owners May 6, 2026 14:07
@JorTurFer
Copy link
Copy Markdown
Member

@zroubalik @wozniakjan

@zammitjohn
Copy link
Copy Markdown
Author

@zroubalik @wozniakjan

Can we merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--enable-cert-rotation incorrectly gated on metricsServer.enabled, breaking operator/webhook certs when metrics server is disabled

2 participants