Skip to content

CORE-1331: fix CI flake from webhook cert secret mount delay#5336

Open
BenElferink wants to merge 7 commits into
odigos-io:mainfrom
BenElferink:core-1331-ci-flake-autoscaler-not-ready-due-to-webhook-cert-secret
Open

CORE-1331: fix CI flake from webhook cert secret mount delay#5336
BenElferink wants to merge 7 commits into
odigos-io:mainfrom
BenElferink:core-1331-ci-flake-autoscaler-not-ready-due-to-webhook-cert-secret

Conversation

@BenElferink

@BenElferink BenElferink commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix autoscaler/instrumentor readiness flake caused by slow kubelet Secret volume sync during webhook cert bootstrap
  • Instead of restarting pods (RestartOnSecretRefresh), sync TLS material from the Secret into a writable local CertDir via SecretDiskSync
  • Point webhook server + cert-controller at that local dir, and remove unused Secret volume mounts

Fixes CORE-1331

Related: cert-controller#35

Test plan

  • Fresh install: autoscaler/instrumentor become Ready with restartCount: 0
  • Confirm cert files appear under /tmp/odigos-webhook-certs shortly after Secret is written
  • Confirm /readyz passes without waiting on kubelet secret projection
  • Watch CI central-install / kubernetes-tests for the previous autoscaler Ready flake
NONE

BenElferink and others added 2 commits July 22, 2026 12:08
Enable RestartOnSecretRefresh on autoscaler and instrumentor cert
rotators so pods remount TLS certs immediately instead of waiting on
slow kubelet secret volume sync during readiness.

Co-authored-by: Cursor <cursoragent@cursor.com>
RestartOnSecretRefresh intentionally restarts autoscaler/instrumentor
once after writing webhook certs; relax restartCount to <= 1.

Co-authored-by: Cursor <cursoragent@cursor.com>
@BenElferink BenElferink added the bug Something isn't working label Jul 22, 2026

@RonFed RonFed left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we should re-start the autoscaler to handle this.
The slowness is only happening in initial install (which is what we test all the time) - users' common use-case is upgrade, which doesn't have this slowness issue.
Having always restart count of 1, might raise some questions, and cause users to think something is wrong

@shivanshuraj1333

Copy link
Copy Markdown
Contributor

Need to unblock the CI, lets put some fix in this PR which help us unblock the CI, also I agree with Ron about the autoscaler restart

Avoid RestartOnSecretRefresh so install no longer bumps restartCount.
Materialize TLS certs from the Secret into a writable local CertDir so
readiness does not wait on kubelet secret volume projection.

Co-authored-by: Cursor <cursoragent@cursor.com>
@BenElferink

Copy link
Copy Markdown
Contributor Author

@RonFed @shivanshuraj1333 Agreed on avoiding autoscaler restart.

Dropped RestartOnSecretRefresh. Instead we now sync webhook TLS material from the Secret into a writable local CertDir (SecretDiskSync), so readiness no longer waits on kubelet secret volume projection and restartCount stays 0.

Also removed the unused Secret volume mounts from autoscaler/instrumentor deployments.

@shivanshuraj1333

Copy link
Copy Markdown
Contributor

LGTM, waiting for Ron's approval

@BenElferink
BenElferink requested a review from RonFed July 22, 2026 13:12
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.

3 participants