Skip to content

[Feature]: Keep defaulting and validation working when admission webhooks are unavailable #10942

Description

@mnencia

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?

Yes

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    triagePending triage
    and removed
    triagePending triage
    on Jun 18, 2026
  2. added theissue type on Jun 18, 2026
  3. added this to the 1.30.0 milestone on Jun 18, 2026
  4. moved this from In Second Review to In First Review in CloudNativePG operator developmenton Jun 18, 2026
  5. moved this from In First Review to In Second Review in CloudNativePG operator developmenton Jun 18, 2026
  6. added a commit that references this issue on Jun 18, 2026
    aefb7a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions