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

Add a mutating admission plugin which add labels for extension types specified in the Spec of the objects #5472

Merged
merged 7 commits into from Mar 2, 2022

Conversation

shafeeqes
Copy link
Contributor

@shafeeqes shafeeqes commented Feb 22, 2022

How to categorize this PR?

/area robustness
/kind enhancement

What this PR does / why we need it:
This PR introduces a new mutating admission pllugin which add labels for all the extension types specified in the spec of the objects (Seeds, Shoots, CloudProfiles, BackupBuckets, BackupEntrys). This would allow the extension admission webhooks to filter out the resources they are responsible for and ignore all others.

Which issue(s) this PR fixes:
Fixes part of #4932

Special notes for your reviewer:
cc @rfranzke

Release note:

A mutating admission plugin is added which adds labels for the extension types  specified in the spec of the objects (`Seed`s, `Shoot`s, `CloudProfile`s, `BackupBucket`s, `BackupEntry`s).  Extensions can make use of this label as object selector in their admission webhooks to filter out the resources, which they are responsible for.

@shafeeqes shafeeqes requested a review from a team as a code owner February 22, 2022 07:38
@gardener-robot gardener-robot added kind/api-change API change with impact on API users needs/second-opinion area/robustness Robustness, reliability, resilience related kind/enhancement Enhancement, improvement, extension size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 22, 2022
@shafeeqes shafeeqes changed the title Add a mutating webhook which add labels for extension types specified in the Spec of the objects Add a mutating webhook which add labels for extension types specified in the Spec of the objects Feb 22, 2022
@shafeeqes shafeeqes marked this pull request as draft February 22, 2022 07:48
@rfranzke rfranzke changed the title Add a mutating webhook which add labels for extension types specified in the Spec of the objects Add a mutating admission plugin which add labels for extension types specified in the Spec of the objects Feb 22, 2022
@shafeeqes
Copy link
Contributor Author

/test all

@shafeeqes shafeeqes marked this pull request as ready for review February 22, 2022 10:03
@rfranzke
Copy link
Member

/assign

docs/concepts/apiserver_admission_plugins.md Outdated Show resolved Hide resolved
pkg/apis/core/v1beta1/constants/types_constants.go Outdated Show resolved Hide resolved
plugin/pkg/global/extensionlabels/admission.go Outdated Show resolved Hide resolved
plugin/pkg/global/extensionlabels/admission.go Outdated Show resolved Hide resolved
Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

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

A release note is probably a good idea as well :)

docs/concepts/apiserver_admission_plugins.md Show resolved Hide resolved
@shafeeqes
Copy link
Contributor Author

Can you add this to the docs/README.md, please?

Is this order fine? 9cbf143

docs/README.md Outdated Show resolved Hide resolved
docs/extensions/extension-admission.md Outdated Show resolved Hide resolved
Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

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

/lgtm

@rfranzke rfranzke merged commit 8bed1bb into gardener:master Mar 2, 2022
@shafeeqes shafeeqes deleted the enhancement/AdmissionWebhooks branch March 2, 2022 17:43
krgostev pushed a commit to krgostev/gardener that referenced this pull request Apr 21, 2022
…specified in the `Spec` of the objects (gardener#5472)

* Minor cosmetics

* Add a mutating admission plugin for adding extension labels

* Address review comments from rfranzke

* Minor edits

* Add extension-admission doc

* Address review comments from rfranzke

* Address review comments from rfranzke
krgostev pushed a commit to krgostev/gardener that referenced this pull request Jul 5, 2022
…specified in the `Spec` of the objects (gardener#5472)

* Minor cosmetics

* Add a mutating admission plugin for adding extension labels

* Address review comments from rfranzke

* Minor edits

* Add extension-admission doc

* Address review comments from rfranzke

* Address review comments from rfranzke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/robustness Robustness, reliability, resilience related kind/api-change API change with impact on API users kind/enhancement Enhancement, improvement, extension size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants