Skip to content

feat(cloudnative-pg): add operator pod disruption budget - #998

Open
WoahitsJoe wants to merge 1 commit into
cloudnative-pg:mainfrom
WoahitsJoe:dev/639
Open

feat(cloudnative-pg): add operator pod disruption budget#998
WoahitsJoe wants to merge 1 commit into
cloudnative-pg:mainfrom
WoahitsJoe:dev/639

Conversation

@WoahitsJoe

@WoahitsJoe WoahitsJoe commented Sep 2, 2026

Copy link
Copy Markdown

Summary

  • add an opt-in policy/v1 PodDisruptionBudget for the CloudNativePG operator Deployment
  • support either minAvailable or maxUnavailable as a count or percentage, including zero
  • expose unhealthyPodEvictionPolicy and validate its supported values
  • preserve namespaceOverride, standard chart labels, and commonAnnotations
  • regenerate the values schema and chart documentation

The chart currently does not create a disruption budget for the operator itself. This leaves operator replicas unprotected during voluntary disruptions such as node drains. The feature remains disabled by default for backward compatibility. When enabled, the default minAvailable: 1 protects the default single-replica operator; users can scale the Deployment and tune the budget for their availability requirements.

This setting applies only to the operator Deployment. PodDisruptionBudgets for PostgreSQL clusters continue to be managed by CloudNativePG through the Cluster spec.

Closes #1003.
Supersedes #639 after its author invited a clean replacement based on current main.

Validation

  • ct lint 3.14.0 with Helm 4.2.4 and the repository CI arguments
  • helm lint with Helm 4.2.4
  • helm-schema 0.23.4 and helm-docs 1.14.2 regeneration
  • codespell
  • render coverage for disabled defaults, count and percentage budgets, maxUnavailable: 0, namespace and annotation overrides, and unhealthy-pod policy
  • failure coverage for conflicting or missing availability fields, negative counts, invalid percentages, and invalid eviction policies

AI assistance

OpenAI Codex assisted with this contribution. The commit includes the corresponding Assisted-by trailer in accordance with the project AI policy.

Add an optional PodDisruptionBudget for the operator deployment with configurable availability and unhealthy-pod eviction policies.

Supersedes the conflict-blocked proposal in cloudnative-pg#639.

Assisted-by: OpenAI Codex
Signed-off-by: Joseph <101808325+WoahitsJoe@users.noreply.github.com>
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.

feat(cloudnative-pg): add operator PodDisruptionBudget support

1 participant