Skip to content

Remove use of alpha initializers#72972

Merged
k8s-ci-robot merged 5 commits intokubernetes:masterfrom
liggitt:remove-alpha-initializers
Jan 24, 2019
Merged

Remove use of alpha initializers#72972
k8s-ci-robot merged 5 commits intokubernetes:masterfrom
liggitt:remove-alpha-initializers

Conversation

@liggitt
Copy link
Copy Markdown
Member

@liggitt liggitt commented Jan 16, 2019

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

  • Marks the alpha metadata.Initializers field deprecated and removes all in-tree use of it
  • Removes the admissionregistration.k8s.io/v1alpha1 API group, containing only the InitializationConfiguration type
  • Removes the IncludeUninitialized field from *Options
  • Removes the alpha Initializers admission plugin
  • Removes use of Initializers fields from the cloud-controller-manager persistent volume labeler controller (stubs the needsInitialization() method to return false, and the markInitialized() method to no-op). This controller will either need to work off of a different attribute (like an annotation), or become an admission webhook.

Which issue(s) this PR fixes:
Fixes #67113

Special notes for your reviewer:

There are no plans to graduate the initializers feature, so removing it sooner rather than later sends a clearer signal to the community that new features should not be built anticipating its promotion.

Does this PR introduce a user-facing change?:

The alpha Initializers feature, `admissionregistration.k8s.io/v1alpha1` API version, `Initializers` admission plugin, and use of the `metadata.initializers` API field have been removed. Discontinue use of the alpha feature and delete any existing `InitializerConfiguration` API objects before upgrading. The `metadata.initializers` field will be removed in a future release.

/sig api-machinery
/cc @lavalamp @deads2k @smarterclayton @caesarxuchao

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jan 16, 2019
@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/apiserver area/kubectl kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. 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/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/testing Categorizes an issue or PR as relevant to SIG Testing. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 16, 2019
@liggitt
Copy link
Copy Markdown
Member Author

liggitt commented Jan 16, 2019

added to the sig-api-machinery meeting agenda on 1/16 for discussion

@liggitt liggitt force-pushed the remove-alpha-initializers branch from e731e22 to c657236 Compare January 16, 2019 16:34
@smarterclayton
Copy link
Copy Markdown
Contributor

Did we want to keep the field so that we don't break downstream and remove it in a future release?

@liggitt
Copy link
Copy Markdown
Member Author

liggitt commented Jan 16, 2019

Did we want to keep the field so that we don't break downstream and remove it in a future release?

Current state:

  • feature is disabled by default
  • when the feature is disabled, any metadata.initializers sent to the apiserver are ignored and not persisted
  • if a local manifest has a metadata.initializers field present, kubectl client-side validation will not complain because the field appears in the openapi schema

We can consider keeping the field in metadata and unconditionally clearing it server-side, but I don't see what would make it safer to remove in a future release than it is now

I'd prefer to remove it from the schema to avoid generating misleading clients

@liggitt
Copy link
Copy Markdown
Member Author

liggitt commented Jan 16, 2019

@kubernetes/sig-cloud-provider-pr-reviews
for impact on PV label controller which was built on the alpha initializers feature

@andrewsykim
Copy link
Copy Markdown
Member

@liggitt is this targeting v1.14?

@liggitt
Copy link
Copy Markdown
Member Author

liggitt commented Jan 16, 2019

yes

@simonferquel
Copy link
Copy Markdown
Contributor

@liggitt I understand, but IncludeUninitialized also had the effect to be able to list resources that are pending finalization (e.g. those that have a non-nil DeletedTimestamp, but a non-empty list of finalizers). How can we list resources that are in this case ? (my use case is within a custom controller, which uses a watch and respond to this condition)

@simonferquel
Copy link
Copy Markdown
Contributor

@liggitt
Copy link
Copy Markdown
Member Author

liggitt commented Mar 20, 2019

@liggitt I understand, but IncludeUninitialized also had the effect to be able to list resources that are pending finalization (e.g. those that have a non-nil DeletedTimestamp, but a non-empty list of finalizers).

Objects pending finalization are included regardless of the IncludeUninitialized parameter.

tengqm added a commit to tengqm/reference-docs that referenced this pull request Mar 25, 2019
Revised the config.yaml file for resource changes happened in 1.14.
This also adds the latest swagger.json from release-1.14 branch.
Resource (type) changes:

- `CSIDriver` and `CSINode` added to `storage.v1beta1` group;
- `VolumeAttachement` graduated from `storage.v1beta1` to `v1`;
- `InitializerConfiguration` from `admissionregistration.v1alpha1` was
  dropped (kubernetes/kubernetes#72972);
- `PriorityClass` graduated from `scheduling.v1beta1` to `scheduling.v1`;
- new resource `auditregistraion.v1alpha1.AuditSink` got added;
- new resource `coordination.v1.Lease` got added;
- new resource `node.v1beta1.RuntimeClass` got added;
richardyuwen pushed a commit to richardyuwen/gardener that referenced this pull request Mar 26, 2019
Due to kubernetes/kubernetes#72972 the alpha `Initializers` feature will be entirely removed with Kubernetes 1.14. We are currently relying on it as the cloud-controller-manager uses it to label persistent volumes before they become visible in the API. This functionality is also removed (see kubernetes/kubernetes#73102) with 1.14. As a consequence, in order to use PV labelling until the community has migrated all CCMs to use `MutatingWebhookConfiguration`s for that, the only way is to enable the (already deprecated) `PersistentVolumeLabel` admission controller in the kube-apiserver. That means that the kube-apiserver needs to talk to the cloud provider to figure out the region/zone of the PV (and later add them as label).
--> We have to provide the cloud credentials + config to the API server in this case.

Shoot clusters with Kubernetes version < 1.14 still have an enabled initializer feature.
mvladev pushed a commit to mvladev/website that referenced this pull request May 29, 2019
mvladev pushed a commit to mvladev/website that referenced this pull request May 29, 2019
mvladev pushed a commit to mvladev/website that referenced this pull request May 29, 2019
k8s-ci-robot pushed a commit to kubernetes/website that referenced this pull request May 30, 2019
* Remove initializers feature gate

Initializers are removed in 1.14
kubernetes/kubernetes#72972

* Update feature-gates.md
mvladev pushed a commit to mvladev/website that referenced this pull request May 30, 2019
Initializers are removed in 1.14 [1]

[1]: kubernetes/kubernetes#72972
k8s-ci-robot pushed a commit to kubernetes/website that referenced this pull request May 30, 2019
Initializers are removed in 1.14 [1]

[1]: kubernetes/kubernetes#72972
mvladev pushed a commit to mvladev/website that referenced this pull request May 31, 2019
Initializers are removed in 1.14 [1]

[1]: kubernetes/kubernetes#72972
mvladev pushed a commit to mvladev/website that referenced this pull request May 31, 2019
Initializers are removed in 1.14 [1]

[1]: kubernetes/kubernetes#72972
mvladev pushed a commit to mvladev/website that referenced this pull request May 31, 2019
Initializers are removed in 1.14 [1]

[1]: kubernetes/kubernetes#72972
k8s-ci-robot pushed a commit to kubernetes/website that referenced this pull request May 31, 2019
Initializers are removed in 1.14 [1]

[1]: kubernetes/kubernetes#72972
k8s-ci-robot pushed a commit to kubernetes/website that referenced this pull request May 31, 2019
Initializers are removed in 1.14 [1]

[1]: kubernetes/kubernetes#72972
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. area/apiserver area/kubectl 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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. 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/architecture Categorizes an issue or PR as relevant to SIG Architecture. 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/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider deprecate Initializers admission controller