Skip to content
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

KEP-3017: Pod Healthy Policy for PDBs #3018

Merged
merged 1 commit into from Feb 3, 2022

Conversation

mortent
Copy link
Member

@mortent mortent commented Oct 24, 2021

  • One-line PR description:
    Add PodHealthyPolicy to PodDisruptionBudget

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory labels Oct 24, 2021
@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Oct 24, 2021
approvers:
- "@liggitt"
- "@soltysh"
- "@wojtek-t"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to also open PRR file later to include KEP in the milestone (together with marking it as implementable): https://github.com/kubernetes/enhancements/tree/master/keps/prod-readiness/sig-apps

Please assing to me.

// covered by a PodDisruptionBudget.
type PodHealthyPolicy string

const (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to consider the other end? That is having MinReadySeconds and PodAvailable as PodHealthyPolicy. The application would then end up with stricter constraints for eviction.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow this. How would MinReadySeconds and PodAvailable solve the issue about when pods should be considered healthy enough to be covered by PDBs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just a hypothetical scenario, not concerning the original issue.

keps/sig-apps/3017-pod-healthy-policy-for-pdb/README.md Outdated Show resolved Hide resolved
keps/sig-apps/3017-pod-healthy-policy-for-pdb/README.md Outdated Show resolved Hide resolved
keps/sig-apps/3017-pod-healthy-policy-for-pdb/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@ravisantoshgudimetla ravisantoshgudimetla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM except some wording

Thank you @mortent

@mortent
Copy link
Member Author

mortent commented Jan 24, 2022

/assign @kow3ns
/cc @liggitt @soltysh

Copy link
Contributor

@soltysh soltysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of nits, but this looks mostly good.
You only need to update the document with the new template and add the missing PRR file.
/hold
to make sure this doesn't land before adding that file
/lgtm
/approve

// whether they are Ready or not. Any pods that are in the Running
// phase will be counted when computing "disruptionsAllowed" and
// will be subject to the PDB for eviction.
PodRunning PodHealthyPolicy = "PodRunning"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the current default, maybe add an info that empty or this means the same.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the disruption controller and the eviction api don't agree on what is needed for a pod to be healthy, so we don't have a policy here that reflect the current behavior. The idea is that by specifying a policy, users can get consistent behavior between the two.

keps/sig-apps/3017-pod-healthy-policy-for-pdb/README.md Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 27, 2022
@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 27, 2022
@ehashman
Copy link
Member

/assign @wojtek-t
for PRR

Copy link
Member

@wojtek-t wojtek-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple minor comments, but requires adding PRR file too.

keps/sig-apps/3017-pod-healthy-policy-for-pdb/README.md Outdated Show resolved Hide resolved

###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?

N/A
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every feature, especially the ones that are extending the API have to be update->downgrade->upgrde tested.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to describe a manual test to verify this, mostly based on looking at other keps. If automated tests are feasible, that would obviously be better.


###### What specific metrics should inform a rollback?

N/A
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can easily imagine a buggy implementatio and e.g. disruption-controller crashing if the field is set or sth.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, added more details here.


N/A

### Monitoring Requirements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required for Alpha, but I recommend you to think about it when implementing Alpha. I will be asking for that for sure during Beta review.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I will make sure this is addressed for beta.

@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 2, 2022
@wojtek-t
Copy link
Member

wojtek-t commented Feb 3, 2022

@mortent - this will require more work for Beta, but it's good enough for Alpha

/lgtm
/approve PRR

Based on @soltysh comment above:
/hold cancel

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Feb 3, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mortent, soltysh, wojtek-t

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2022
@k8s-ci-robot k8s-ci-robot merged commit 91dca47 into kubernetes:master Feb 3, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.24 milestone Feb 3, 2022
Copy link

@Wel112 Wel112 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracking Issue description​,Provide supporting details for a feature in development labels​:kind/feature
​pod ​?What would you like to be added?
pls description​ the issues.Feature requests are unlikely to make progress as issues. Please consider engaging with SIGs on slack and mailing lists, instead.A proposal that works through the design along with the implications of the change can be opened as a enhancementskepses-proposals-keps Why is this needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/apps Categorizes an issue or PR as relevant to SIG Apps. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants