-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 --enable-admission-plugins API server flag for k8s 1.10 #5221
Add --enable-admission-plugins API server flag for k8s 1.10 #5221
Conversation
/assign @geojaz I'm not sure the proper way to deprecate these flags are, so comments are appreciated. |
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.
Sounds reasonable :-)...
Could be also include here please ..and the other api versions
In retrospect perhaps we should move this logic out of the api versions ... but i'll leave that to another PR
/assign @gambol99 |
…on-control in v1.10
…ion controller is enabled or not
6463dd7
to
d9252a1
Compare
@gambol99 - Thanks for the review. I added another commit to modify |
/ok-to-test |
@@ -461,5 +465,16 @@ func (c *KubeAPIServerConfig) HasAdmissionController(name string) bool { | |||
} | |||
} | |||
|
|||
for _, x := range c.DisableAdmissionPlugins { |
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.
perhaps ...
for _, x := range x.DisableAdmissionPlugins {
if x == name {
return false
}
}
for _, x := range append(c.AdmissionControl, c.EnableAdmissionPlugins...)
if x == name {
return true // and save a few lines
}
}
but up to you .. it's just code preference, so no biggie :-)
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.
Unless you and another reviewer feel strongly about combining them, I'd rather keep them separate. Subjectively, range append(c.AdmissionControl, c.EnableAdmissionPlugins...)
is harder to read, only to save a couple of lines. Presumably we'll be cleaning up c.AdmissionControl
in the future anyway, when it has been removed from k/k and kops stops supporting older versions.
Looks good to me ... cc'ing @justinsb for a second opinion :-) |
/approve /lgtm Thanks @ripta |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: justinsb, ripta 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 |
A previous PR kubernetes#5221 introduced the --enable-admission-plugins for >= 1.10.0 as recommended, it does however cause an issue if you already have AdmissionControl is specified in the Spec as both flags get rendered
A previous PR kubernetes#5221 introduced the --enable-admission-plugins for >= 1.10.0 as recommended, it does however cause an issue if you already have AdmissionControl is specified in the Spec as both flags get rendered
A previous PR kubernetes#5221 introduced the --enable-admission-plugins for >= 1.10.0 as recommended, it does however cause an issue if you already have AdmissionControl is specified in the Spec as both flags get rendered
A previous PR kubernetes#5221 introduced the --enable-admission-plugins for >= 1.10.0 as recommended, it does however cause an issue if you already have AdmissionControl is specified in the Spec as both flags get rendered
A previous PR kubernetes#5221 introduced the --enable-admission-plugins for >= 1.10.0 as recommended, it does however cause an issue if you already have AdmissionControl is specified in the Spec as both flags get rendered
According to the section on recommended admission controllers:
--admission-control
has been deprecated in 1.10, replaced with a new flag.AllOrderedPlugins
.As such, this PR:
--enable-admission-plugins
and also the additional flag,--disable-admission-plugins
.--admission-control
deprecated.