-
Notifications
You must be signed in to change notification settings - Fork 39.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PodHealthyPolicy for PDBs #108233
Add PodHealthyPolicy for PDBs #108233
Conversation
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
/test pull-kubernetes-integration |
/test pull-kubernetes-conformance-kind-ga-only-parallel |
cc @deads2k |
7a33147
to
76a29e5
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mortent The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
76a29e5
to
705331a
Compare
/test pull-kubernetes-e2e-gce-100-performance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're missing clearing the PodHealthyPolicy
field when the feature is disabled, similarly to how we do that for example here:
- for create
kubernetes/pkg/registry/batch/job/strategy.go
Lines 96 to 102 in a83c979
if utilfeature.DefaultFeatureGate.Enabled(features.JobTrackingWithFinalizers) { // Until this feature graduates to GA and soaks in clusters, we use an // annotation to mark whether jobs are tracked with it. addJobTrackingAnnotation(job) } else { dropJobTrackingAnnotation(job) } - for update
kubernetes/pkg/registry/batch/job/strategy.go
Lines 132 to 134 in a83c979
if !utilfeature.DefaultFeatureGate.Enabled(features.JobTrackingWithFinalizers) && !hasJobTrackingAnnotation(oldJob) { dropJobTrackingAnnotation(newJob) }
// controller computes "disruptionsAllowed", but all pods in the Running phase | ||
// will be subject to the PDB on eviction. | ||
// +optional | ||
PodHealthyPolicy PodHealthyPolicy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add information this is alpha-level field and that feature flag needs to be enabled for it to work: similarly to
kubernetes/pkg/apis/batch/types.go
Lines 246 to 251 in a83c979
// The number of active pods which have a Ready condition. | |
// | |
// This field is alpha-level. The job controller populates the field when | |
// the feature gate JobReadyPods is enabled (disabled by default). | |
// +optional | |
Ready *int32 |
@mortent: PR needs rebase. 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 kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
@mortent - Do you have sometime to work on this? If not, I can take over. This is blocking couple of features that we're interested in bringing into OpenShift and Kube |
I'll take over this as it is blocking couple of features in sig-apps and OpenShift. Will open a PR shortly. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In 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 kubernetes/test-infra repository. |
hi @mortent, we are building on top of this PR with @ravisantoshgudimetla - |
What type of PR is this?
This PR implements the
PodHealthyPolicy
for PodDisruptionBudgets as described in kubernetes/enhancements#3017/kind feature
/kind api-change
/sig apps
What this PR does / why we need it:
This allows users to specify how PodDisruptionBudget and the eviction API should handle pods that are
Running
but notReady
.Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: