'*' is valid for allowed seccomp profiles

This commit is contained in:
Tim Allclair
2017-09-11 11:47:03 -07:00
parent db809c0eb7
commit 49a38728aa
2 changed files with 13 additions and 1 deletions

View File

@@ -698,6 +698,9 @@ func ValidatePodSecurityPolicySpecificAnnotations(annotations map[string]string,
}
if allowed := annotations[seccomp.AllowedProfilesAnnotationKey]; allowed != "" {
for _, p := range strings.Split(allowed, ",") {
if p == seccomp.AllowAny {
continue
}
allErrs = append(allErrs, apivalidation.ValidateSeccompProfile(p, fldPath.Key(seccomp.AllowedProfilesAnnotationKey))...)
}
}