-
Notifications
You must be signed in to change notification settings - Fork 40k
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
set default enabled admission plugins by official document #58684
set default enabled admission plugins by official document #58684
Conversation
And after this , the document also need revise. |
48574ab
to
e051ab5
Compare
pkg/kubeapiserver/options/plugins.go
Outdated
defaultOffPlugins := sets.NewString(AllOrderedPlugins...) | ||
defaultOffPlugins.Delete(lifecycle.PluginName) | ||
defaultOnPlugins := sets.NewString( | ||
lifecycle.PluginName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alias the packages to admission plugin names so we can recognize these. I think this is namespacelifecycle
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add later.
@@ -79,7 +79,7 @@ func NewAdmissionOptions() *AdmissionOptions { | |||
// after all the mutating ones, so their relative order in this list | |||
// doesn't matter. | |||
RecommendedPluginOrder: []string{lifecycle.PluginName, initialization.PluginName, mutatingwebhook.PluginName, validatingwebhook.PluginName}, | |||
DefaultOffPlugins: sets.NewString(initialization.PluginName, mutatingwebhook.PluginName, validatingwebhook.PluginName), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split this out, it is non-contentious
This is a huge change. I'm strongly in favor, but we need to agree that we're willing to do this.
@smarterclayton @bgrant0607 @kubernetes/api-approvers @lavalamp @erictune @liggitt for comment on having a default admission chain. |
4e9af03
to
21c1040
Compare
ping @smarterclayton @bgrant0607 @kubernetes/api-approvers @lavalamp @erictune @liggitt for comment on having a default admission chain. |
I am in favor of fixing this but I'm not sure this is the right way to do it.
|
I'm ok with having a
The idea of a "default on" list is that we think these are a good default for a safe and sane cluster, it's not a guarantee of particular plugins being on or off. Think about things like the PodToleration plugin. If you don't enable it in the same release that you added taint and toleration support, the feature presents |
How many (non-toy/dev) clusters are out there without Compared with the big switch to RBAC-by-default, any serious cluster probably has admission plugins enabled anyway. This was very different for RBAC. |
We need to think carefully about what we're trying to achieve. If we want to make it easier for users to stay up to date with recommended admission controllers, I suggest a new flag along the lines of --enable-recommended-admission-controllers, and a warning if the existing flag is otherwise left unset. |
I'm in favor of making this change, and having it be opt-out. |
The release note needs to be more specific. Maybe append something like this:
|
@erictune ok, will update today. |
21c1040
to
64cb323
Compare
so many case failed with ServiceAccount plugin enabled. |
controllers not running maybe? |
Sorry, I didn't see that this got itself sorted out. /lgtm squash up when you rebase |
1c81b14
to
de6bb56
Compare
/lgtm |
de6bb56
to
27f3fd2
Compare
run gofmt |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, hzxuzhonghu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
setdefault.PluginName, //DefaultStorageClass | ||
defaulttolerationseconds.PluginName, //DefaultTolerationSeconds | ||
mutatingwebhook.PluginName, //MutatingAdmissionWebhook | ||
validatingwebhook.PluginName, //ValidatingAdmissionWebhook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are webhooks off by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks to make them on by default, not off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. I was reading the function name, not the variable name. Sorry for the noise.
> * Default enabled admission plugins are now `NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota`. Please note that if you previously had not set the `--admission-control` flag, your cluster behavior may change (to be more standard). ([#58684](kubernetes/kubernetes#58684), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) https://github.com/kubernetes/kubernetes/blob/a6b0eaecc99c07aef4952e8fae09642cabe4df5e/CHANGELOG/CHANGELOG-1.10.md#L1542
> * Default enabled admission plugins are now `NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota`. Please note that if you previously had not set the `--admission-control` flag, your cluster behavior may change (to be more standard). ([#58684](kubernetes/kubernetes#58684), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) https://github.com/kubernetes/kubernetes/blob/a6b0eaecc99c07aef4952e8fae09642cabe4df5e/CHANGELOG/CHANGELOG-1.10.md#L1542
> * Default enabled admission plugins are now `NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota`. Please note that if you previously had not set the `--admission-control` flag, your cluster behavior may change (to be more standard). ([#58684](kubernetes/kubernetes#58684), [@hzxuzhonghu](https://github.com/hzxuzhonghu)) https://github.com/kubernetes/kubernetes/blob/a6b0eaecc99c07aef4952e8fae09642cabe4df5e/CHANGELOG/CHANGELOG-1.10.md#L1542
What this PR does / why we need it:
https://kubernetes.io/docs/admin/admission-controllers/#is-there-a-recommended-set-of-admission-controllers-to-use
recommend running the following set of admission controllers
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: