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

Fix PDB by percentages for StatefulSet pods #39454

Merged

Conversation

foxish
Copy link
Contributor

@foxish foxish commented Jan 5, 2017

Previously, PDBs defined in terms of percentages would error out with StatefulSet as they did not know how to find the scale associated.
This change teaches the disruption controller to also look at StatefulSets and their scale.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #39125

Release note:

Fix issue with PodDisruptionBudgets in which `minAvailable` specified as a percentage did not work with StatefulSet Pods.

cc @a-robinson @kow3ns @kubernetes/sig-apps-misc

@foxish foxish added area/stateful-apps release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jan 5, 2017
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 5, 2017
@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

Jenkins Bazel Build failed for commit 1508ecf. Full PR test history.

The magic incantation to run this job again is @k8s-bot bazel test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 5, 2017
@k8s-ci-robot
Copy link
Contributor

Jenkins verification failed for commit 1508ecf. Full PR test history.

The magic incantation to run this job again is @k8s-bot verify test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@a-robinson
Copy link
Contributor

Thanks @foxish!

@davidopp
Copy link
Member

davidopp commented Jan 5, 2017

Thanks a lot for fixing this, @foxish !

@mwielgus can you please review it?

@mwielgus
Copy link
Contributor

mwielgus commented Jan 5, 2017

LGTM

@mwielgus mwielgus self-requested a review January 5, 2017 09:21
@mwielgus mwielgus added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 5, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 39435, 39454)

@k8s-github-robot k8s-github-robot merged commit f8b7083 into kubernetes:master Jan 5, 2017
@foxish foxish deleted the fix-stateful-set-detection branch January 5, 2017 18:04
@foxish
Copy link
Contributor Author

foxish commented Jan 5, 2017

@saad-ali, can we cherrypick this fix into the next 1.5.x release?

@k8s-cherrypick-bot
Copy link

Removing label cherrypick-candidate because no release milestone was set. This is an invalid state and thus this PR is not being considered for cherry-pick to any release branch. Please add an appropriate release milestone and then re-add the label.

@foxish
Copy link
Contributor Author

foxish commented Jan 6, 2017

If this is cherrypicked, so should #39544

@saad-ali saad-ali added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jan 20, 2017
k8s-github-robot pushed a commit that referenced this pull request Jan 21, 2017
…39544-upstream-release-1.5

Automatic merge from submit-queue

Automated cherry pick of #39454 #39544

Cherry pick of #39454 #39544 on release-1.5.

#39454: Make PDBs represent percentage in StatefulSet
#39544: Allow disruption controller to read statefulsets

/cc @davidopp @maisem @kubernetes/sig-apps-misc 

**Release note**:

```
Fixed bug which prevents PDBs which have minAvailable specified as a percentage working with StatefulSet pods
```
@k8s-cherrypick-bot
Copy link

Commit found in the "release-1.5" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/stateful-apps cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

PodDisruptionBudget by percentage doesn't work with StatefulSets
9 participants