Fix typo in error message for anonymous field in AuthenticationConfiguration.

Kubernetes-commit: 27e8923c70c8bf95e0db02aeb7a0d45908ae9d62
This commit is contained in:
Vinayak Goyal 2024-07-09 21:04:28 +00:00 committed by Kubernetes Publisher
parent ad20d53f30
commit fd1f3aafaf
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ func ValidateAuthenticationConfiguration(c *api.AuthenticationConfiguration, dis
if c.Anonymous != nil {
if !utilfeature.DefaultFeatureGate.Enabled(features.AnonymousAuthConfigurableEndpoints) {
allErrs = append(allErrs, field.Forbidden(field.NewPath("anonymous"), "anonymous is not supported when when AnonymousAuthConfigurableEnpoints feature gate is disabled"))
allErrs = append(allErrs, field.Forbidden(field.NewPath("anonymous"), "anonymous is not supported when AnonymousAuthConfigurableEnpoints feature gate is disabled"))
}
if !c.Anonymous.Enabled && len(c.Anonymous.Conditions) > 0 {
allErrs = append(allErrs, field.Invalid(field.NewPath("anonymous", "conditions"), c.Anonymous.Conditions, "enabled should be set to true when conditions are defined"))