mirror of https://github.com/kubernetes/kops.git
Merge pull request #14045 from olemarkus/no-psp
Do not allow PodSecurityPolicy using K8s 1.25
This commit is contained in:
commit
d1f66b8479
|
|
@ -594,6 +594,20 @@ func validateKubeAPIServer(v *kops.KubeAPIServerConfig, c *kops.Cluster, fldPath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, plugin := range v.EnableAdmissionPlugins {
|
||||||
|
if plugin == "PodSecurityPolicy" && c.IsKubernetesGTE("1.25") {
|
||||||
|
allErrs = append(allErrs, field.Forbidden(fldPath.Child("enableAdmissionPlugins"),
|
||||||
|
"PodSecurityPolicy has been removed from Kubernetes 1.25"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, plugin := range v.AdmissionControl {
|
||||||
|
if plugin == "PodSecurityPolicy" && c.IsKubernetesGTE("1.25") {
|
||||||
|
allErrs = append(allErrs, field.Forbidden(fldPath.Child("admissionControl"),
|
||||||
|
"PodSecurityPolicy has been removed from Kubernetes 1.25"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
proxyClientCertIsNil := v.ProxyClientCertFile == nil
|
proxyClientCertIsNil := v.ProxyClientCertFile == nil
|
||||||
proxyClientKeyIsNil := v.ProxyClientKeyFile == nil
|
proxyClientKeyIsNil := v.ProxyClientKeyFile == nil
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue