Improve an error message when privileged containers are disallowed globally on the cluster.
This commit is contained in:
@@ -3692,7 +3692,7 @@ func ValidateSecurityContext(sc *api.SecurityContext, fldPath *field.Path) field
|
||||
|
||||
if sc.Privileged != nil {
|
||||
if *sc.Privileged && !capabilities.Get().AllowPrivileged {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("privileged"), "disallowed by policy"))
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("privileged"), "disallowed by cluster policy"))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user