mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Add TODO for AppArmor validation depending on feature gate
This commit is contained in:
parent
82826ec273
commit
d00c9a33f9
@ -2064,6 +2064,7 @@ func ValidateAppArmorPodAnnotations(annotations map[string]string, spec *api.Pod
|
|||||||
if !strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) {
|
if !strings.HasPrefix(k, apparmor.ContainerAnnotationKeyPrefix) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
// TODO: this belongs to admission, not general pod validation:
|
||||||
if !utilfeature.DefaultFeatureGate.Enabled(features.AppArmor) {
|
if !utilfeature.DefaultFeatureGate.Enabled(features.AppArmor) {
|
||||||
allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "AppArmor is disabled by feature-gate"))
|
allErrs = append(allErrs, field.Forbidden(fldPath.Key(k), "AppArmor is disabled by feature-gate"))
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user