You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Keep defaulting and validation working when admission webhooks are unavailable #10942
Is there an existing issue already for this feature request/idea?
I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated.
What problem is this feature going to solve? Why should it be added?
CloudNativePG relies on admission webhooks to default and validate its resources (Cluster, Backup, ScheduledBackup, Pooler, Database). When the webhooks are not installed, or are temporarily unable to respond, resources are admitted without ever being defaulted or validated. The operator then reconciles specs that are incomplete or invalid, and the user gets no clear signal about what went wrong. The webhook is effectively a single point at which correctness is enforced, and when it is absent that enforcement disappears silently.
Describe the solution you'd like
Defaulting and validation should keep working even when the webhook did not run. During reconciliation the operator should notice a resource that is missing its defaults and either apply them itself or wait for the webhook to do so, and it should validate the spec as a fallback. When validation fails, the reason should be surfaced on the resource status so the user can see exactly why the resource was rejected, instead of having to infer it from downstream reconcile failures.
Describe alternatives you've considered
Making the webhooks mandatory with a failing failure policy would block all writes whenever the webhook is down, including unrelated ones, and it does not help installation methods that intentionally omit the webhooks. Documenting that the webhooks are required does not actually protect a cluster whose webhook is missing or briefly unavailable. Handling defaulting and validation as a reconciliation fallback covers both cases without making the operator brittle.
Additional context
Implemented in #10874. Related to #9278, which discusses making the webhook dependency optional.
Backport?
Yes
Are you willing to actively contribute to this feature?
Activity
feat: keep defaulting and validation working when admission webhooks …