pkg/apis/rbac: make apiversion optional for subjects and fix validation

This commit is contained in:
Eric Chiang
2016-06-07 10:53:18 -07:00
parent 8bcecac12f
commit 88119903e5
3 changed files with 2 additions and 15 deletions

View File

@@ -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: