Bumping k8s dependencies to 1.13
This commit is contained in:
7
vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission.go
generated
vendored
7
vendor/k8s.io/kubernetes/plugin/pkg/admission/limitranger/admission.go
generated
vendored
@@ -463,6 +463,13 @@ func (d *DefaultLimitRangerActions) SupportsAttributes(a admission.Attributes) b
|
||||
return false
|
||||
}
|
||||
|
||||
// Since containers and initContainers cannot currently be added, removed, or updated, it is unnecessary
|
||||
// to mutate and validate limitrange on pod updates. Trying to mutate containers or initContainers on a pod
|
||||
// update request will always fail pod validation because those fields are immutable once the object is created.
|
||||
if a.GetKind().GroupKind() == api.Kind("Pod") && a.GetOperation() == admission.Update {
|
||||
return false
|
||||
}
|
||||
|
||||
return a.GetKind().GroupKind() == api.Kind("Pod") || a.GetKind().GroupKind() == api.Kind("PersistentVolumeClaim")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user