CNTRLPLANE-2740: Set unhealthyPodEvictionPolicy to AlwaysAllow on all PDBs#7721
Conversation
…PDBs Set the PodDisruptionBudget unhealthyPodEvictionPolicy property to AlwaysAllow for all PDBs managed by the HostedControlPlane operator. This allows running-but-unhealthy pods to be evicted during node drains on the management cluster, without reducing hosted service availability since unready pods are not contributing to service availability. Remove unused support/util/pdb.go as ReconcilePodDisruptionBudget had zero production callers. This addresses WRKLDS-1490 which asks all PDB maintainers to adopt the unhealthyPodEvictionPolicy property (GA in Kubernetes 1.31 / OCP 4.18). Ref: CNTRLPLANE-2740 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Regenerated by: UPDATE=true go test ./control-plane-operator/controllers/hostedcontrolplane/ -run TestControlPlaneComponents Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@enxebre: This pull request references CNTRLPLANE-2740 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughThis pull request updates PodDisruptionBudget specifications across multiple control plane components and cloud provider variants to include Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
|
/test verify |
|
/test images |
bryan-cox
left a comment
There was a problem hiding this comment.
/lgtm
/hold
Holding for others general consensus, feel free to remove it when you want
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm I don't see a negative to making this the default even if it doesn't fix the problem entirely. |
|
/hold cancel |
|
/test e2e-aks |
|
/retest |
|
/retest |
|
/verified by @jiezhao16 |
|
@enxebre: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@enxebre: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
unhealthyPodEvictionPolicy: AlwaysAllowon all PDBs managed by the HCP operator (etcd, kube-apiserver, openshift-apiserver, openshift-oauth-apiserver, oauth-openshift, HCP private router, shared ingress router)support/util/pdb.go(zero production callers)What this PR does / why we need it
Sets
unhealthyPodEvictionPolicy: AlwaysAllowon every PodDisruptionBudget managed by the HostedControlPlane operator.This allows running-but-unhealthy hosted control-plane pods to be evicted during management cluster node drains. Unready pods are unlikely to be contributing to service availability, so blocking drains on their behalf adds risk without meaningful availability benefit.
The
unhealthyPodEvictionPolicyfield is GA since Kubernetes 1.31 / OpenShift 4.18.Components affected
All PDBs managed by the HCP operator:
Changes
support/controlplane-component/common.go–AdaptPodDisruptionBudget()now setsUnhealthyPodEvictionPolicytoAlwaysAllow(covers the 6 v2 control-plane components)hypershift-operator/controllers/sharedingress/router.go–ReconcileRouterPodDisruptionBudget()updated for the shared ingress router PDBsupport/util/pdb.go– removed (zero production callers)Which issue(s) this PR fixes
Fixes CNTRLPLANE-2740
Special notes for your reviewer
The
unhealthyPodEvictionPolicyfield is set programmatically in the Go adapter function that already mutates PDB specs at reconciliation time. No YAML asset changes are needed. The second commit contains only regenerated fixture files.Checklist
🤖 Generated with Claude Code