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

Promote PodDisruptionBudget to policy/v1 #99290

Merged
merged 3 commits into from Mar 9, 2021

Conversation

mortent
Copy link
Member

@mortent mortent commented Feb 22, 2021

What type of PR is this?

/kind api-change
/kind feature

What this PR does / why we need it:

This promotes PodDisruptionBudget resource to policy/v1 based on kubernetes/enhancements#85 and detailed description in https://github.com/kubernetes/enhancements/tree/master/keps/sig-apps/85-Graduate-PDB-to-Stable

Which issue(s) this PR fixes:

Fixes #95083

Special notes for your reviewer:

This replaces an older PR at #81571.

Does this PR introduce a user-facing change?

The PodDisruptionBudget API has been promoted to policy/v1 with no schema changes. The only functional change is that an empty selector (`{}`) written to a policy/v1 PodDisruptionBudget now selects all pods in the namespace. The behavior of the policy/v1beta1 API remains unchanged. The policy/v1beta1 PodDisruptionBudget API is deprecated and will no longer be served in 1.25+.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-apps/85-Graduate-PDB-to-Stable

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 22, 2021
@k8s-ci-robot k8s-ci-robot added area/apiserver area/kubectl area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 22, 2021
@fejta-bot
Copy link

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.

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.

I left you some initial comments, you're also missing necessary changes to pkg/api/testing/defaulting_test.go which you can see from unit-test failure from that package.

pkg/apis/policy/install/install.go Show resolved Hide resolved
pkg/features/kube_features.go Outdated Show resolved Hide resolved
staging/src/k8s.io/api/policy/v1/types.go Outdated Show resolved Hide resolved
staging/src/k8s.io/api/policy/v1/types.go Outdated Show resolved Hide resolved
staging/src/k8s.io/api/policy/v1beta1/types.go Outdated Show resolved Hide resolved
@mortent mortent force-pushed the PromotePDBsToGA branch 2 times, most recently from 2949f71 to bf8cad0 Compare February 23, 2021 07:38
@fedebongio
Copy link
Contributor

/cc @wojtek-t
/remove-sig api-machinery

@k8s-ci-robot k8s-ci-robot removed the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Feb 23, 2021
staging/src/k8s.io/api/policy/v1beta1/types.go Outdated Show resolved Hide resolved
staging/src/k8s.io/api/policy/v1beta1/types.go Outdated Show resolved Hide resolved
staging/src/k8s.io/api/policy/v1/types.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Feb 24, 2021
@mortent
Copy link
Member Author

mortent commented Feb 24, 2021

/test pull-kubernetes-integration

@k8s-ci-robot
Copy link
Contributor

@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.

2 similar comments
@k8s-ci-robot
Copy link
Contributor

@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.

@k8s-ci-robot
Copy link
Contributor

@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.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 9, 2021
@liggitt
Copy link
Member

liggitt commented Mar 9, 2021

rebased with no conflicts
/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Mar 9, 2021
@liggitt liggitt added the api-review Categorizes an issue or PR as actively needing an API review. label Mar 9, 2021
@liggitt
Copy link
Member

liggitt commented Mar 9, 2021

/retest

@liggitt
Copy link
Member

liggitt commented Mar 9, 2021

flakes were #99911 and #94564

@k8s-ci-robot
Copy link
Contributor

@mortent: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-integration 66e7227 link /test pull-kubernetes-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@mortent
Copy link
Member Author

mortent commented Mar 9, 2021

/test pull-kubernetes-integration

@liggitt
Copy link
Member

liggitt commented Mar 9, 2021

integration flake is #98116 (comment)

@k8s-ci-robot k8s-ci-robot merged commit 046ad61 into kubernetes:master Mar 9, 2021
@liggitt liggitt moved this from GA cleanup to Complete in PodDisruptionBudget Mar 15, 2021
@wilsonehusin
Copy link
Contributor

hey folks, 1.21 Release Notes team here -- want to check in and disambiguate this line:

The only functional change is that an empty selector ({}) written to a policy/v1 PodDisruptionBudget now selects all pods in the namespace.

does this behavior warrant this note to be in ACTION REQUIRED / Urgent Upgrade Notes? I'm not too familiar with how PodDisruptionBudget works when given empty selector, and if this potentially creates side effect to end users on v1beta1 -> v1, then we might want to surface this note 😄

cc @mortent @liggitt

@liggitt
Copy link
Member

liggitt commented Mar 29, 2021

No, there are no side effects to existing v1beta1 consumers that require action prior to upgrade to 1.21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver area/cloudprovider area/dependency Issues or PRs related to dependency changes area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/kubectl area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: API review completed, 1.21
Development

Successfully merging this pull request may close these issues.

Disruption controller handles PodDisruptionBudget with empty selector incorrectly
10 participants