mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 03:38:15 +00:00
pkg/apis/rbac: make apiversion optional for subjects and fix validation
This commit is contained in:
@@ -105,9 +105,6 @@ func validateRoleBindingSubject(subject rbac.Subject, isNamespaced bool, fldPath
|
||||
if len(subject.Name) == 0 {
|
||||
allErrs = append(allErrs, field.Required(fldPath.Child("name"), ""))
|
||||
}
|
||||
if len(subject.APIVersion) != 0 {
|
||||
allErrs = append(allErrs, field.Forbidden(fldPath.Child("apiVersion"), subject.APIVersion))
|
||||
}
|
||||
|
||||
switch subject.Kind {
|
||||
case rbac.ServiceAccountKind:
|
||||
|
||||
Reference in New Issue
Block a user