diff --git a/pkg/kubeapiserver/options/authorization.go b/pkg/kubeapiserver/options/authorization.go index a6760d1720e..778ca1210d7 100644 --- a/pkg/kubeapiserver/options/authorization.go +++ b/pkg/kubeapiserver/options/authorization.go @@ -88,7 +88,7 @@ func (o *BuiltInAuthorizationOptions) Validate() []error { allErrors = append(allErrors, fmt.Errorf("cannot specify --authorization-webhook-config-file without mode Webhook")) } - if len(o.Modes) != len(modes.List()) { + if len(o.Modes) != modes.Len() { allErrors = append(allErrors, fmt.Errorf("authorization-mode %q has mode specified more than once", o.Modes)) }