Thanks to visit codestin.com
Credit goes to github.com

Skip to content

WIP - Stop serving deprecated extensions/v1beta1 resources by default #58819

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

Closed

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Jan 25, 2018

xref #43214

From the 1.7 release notes:

NetworkPolicy has been moved from extensions/v1beta1 to the new (#39164, @danwinship) networking.k8s.io/v1 API group.

From the 1.8 release notes:

The Deployment, DaemonSet, and ReplicaSet kinds in the extensions/v1beta1 group version are now deprecated, as are the Deployment, StatefulSet, and ControllerRevision kinds in apps/v1beta1. As they will not be removed until after a GA version becomes available, you may continue to use these kinds in existing code. However, all new code should be developed against the apps/v1beta2 group version

This PR disables these extensions/v1beta1 resources from being served by default in 1.10, though they can be re-enabled via --runtime-config.

Objects already stored in etcd in extensions/v1beta1 format can still be read

The following deprecated resources in the `extensions/v1beta1` API group are no longer served by default, and will be removed in a future release:
* networkpolicies (use `network.k8s.io/v1` instead)
* daemonsets, deployments, replicasets (use `apps/v1` instead)

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 25, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: liggitt
We suggest the following additional approver: deads2k

Assign the PR to them by writing /assign @deads2k in a comment when ready.

No associated issue. Update pull-request body to add a reference to an issue, or get approval with /approve no-issue

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

From the 1.7 release notes:
NetworkPolicy has been moved from extensions/v1beta1 to the new (kubernetes#39164, @danwinship) networking.k8s.io/v1 API group.

From the 1.8 release notes:
The Deployment, DaemonSet, and ReplicaSet kinds in the extensions/v1beta1 group version are now deprecated, as are the Deployment, StatefulSet, and ControllerRevision kinds in apps/v1beta1. As they will not be removed until after a GA version becomes available, you may continue to use these kinds in existing code. However, all new code should be developed against the apps/v1beta2 group version

This PR disables these extensions/v1beta1 resources from being served by default in 1.10, though they can be re-enabled via --runtime-config.

Objects already stored in etcd in extensions/v1beta1 format can still be read
@liggitt liggitt force-pushed the disable-deprecated-extensions branch from 192f9c0 to f977cae Compare January 25, 2018 17:55
@liggitt liggitt changed the title Stop serving extensions/v1beta1 network policy by default Stop serving deprecated extensions/v1beta1 resources by default Jan 25, 2018
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jan 25, 2018
@liggitt liggitt added release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jan 25, 2018
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-action-required Denotes a PR that introduces potentially breaking changes that require user action. labels Jan 25, 2018
@k8s-ci-robot
Copy link
Contributor

@liggitt: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-node-e2e f977cae link /test pull-kubernetes-node-e2e
pull-kubernetes-unit f977cae link /test pull-kubernetes-unit
pull-kubernetes-kubemark-e2e-gce f977cae link /test pull-kubernetes-kubemark-e2e-gce
pull-kubernetes-e2e-gce f977cae link /test pull-kubernetes-e2e-gce
pull-kubernetes-e2e-gce-device-plugin-gpu f977cae link /test pull-kubernetes-e2e-gce-device-plugin-gpu
pull-kubernetes-e2e-kops-aws f977cae link /test pull-kubernetes-e2e-kops-aws
pull-kubernetes-verify f977cae link /test pull-kubernetes-verify

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.

@soltysh
Copy link
Contributor

soltysh commented Jan 25, 2018

I'm worried this might break some stuff. We need to ensure these versions are not used before we disable them. Currently they are used for storage conversion and that has to be fixed, see my #43214 (comment)

@soltysh
Copy link
Contributor

soltysh commented Jan 25, 2018

/hold

@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 25, 2018
@liggitt
Copy link
Member Author

liggitt commented Jan 25, 2018

I'm worried this might break some stuff. We need to ensure these versions are not used before we disable them.

This should just be disabling serving them, not disabling them in storage (the etcd storage version integration test will verify that).

That said, it looks like there might be other things entangled here. Moving internal versions to the apps group might be a better first step.

Also opened #58854 to start persisting in etcd in apps/v1

@liggitt liggitt added this to the v1.10 milestone Jan 26, 2018
@liggitt liggitt changed the title Stop serving deprecated extensions/v1beta1 resources by default WIP - Stop serving deprecated extensions/v1beta1 resources by default Jan 26, 2018
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 26, 2018
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 30, 2018
@k8s-github-robot
Copy link

@liggitt PR needs rebase

@hzxuzhonghu
Copy link
Member

I have already done this by #58863.

@liggitt
Copy link
Member Author

liggitt commented Feb 2, 2018

I have already done this by #58863.

Not quite, this defaults to not serving these resources from extensions/v1beta1

@hzxuzhonghu
Copy link
Member

Currently no support for disable resources under a version

@hzxuzhonghu
Copy link
Member

According @deads2k , only can support enable/disable group/version.

@deads2k
Copy link
Contributor

deads2k commented Feb 2, 2018

Not quite, this defaults to not serving these resources from extensions/v1beta1

Enabling and disabling particular resources inside of a GroupVersion leads to weird results. Imagine batch with cronjobs and not jobs. Or rbac without roles, but everything else. The remaining pieces don't function properly. In general, it is an anti-feature. It does not belong in the generic apiserver.

I'm not convinced that we must support selective disablement of resources at all. The resource in question are still accessible via the API in other locations, so this is preventing the concepts from being used. What is the concrete benefit to doing this? The new versions exist and eventually when the entire extensions group is empty we can have a "disable the entire version by default". Removing some resources a little early (maybe) is of dubious value and adds significant complexity.

@liggitt If you really feel a need to bring back the feature, I'm sure you'll keep it contained to the kube-apiserver. But I really doubt that it adds enough value to be worth the effort.

@liggitt liggitt closed this Feb 10, 2018
@liggitt liggitt deleted the disable-deprecated-extensions branch November 25, 2019 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants