From d71e7e785957ac21df985def14643a818f5d430f Mon Sep 17 00:00:00 2001 From: Dmitri Fedotov Date: Thu, 2 Oct 2025 15:57:04 +0300 Subject: [PATCH] fix typo for `AnonymousAuthConfigurableEndpoints` error --- pkg/kubeapiserver/options/authentication_test.go | 2 +- .../apiserver/pkg/apis/apiserver/validation/validation.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kubeapiserver/options/authentication_test.go b/pkg/kubeapiserver/options/authentication_test.go index 9e2cb74e8bd..98d57b9fb78 100644 --- a/pkg/kubeapiserver/options/authentication_test.go +++ b/pkg/kubeapiserver/options/authentication_test.go @@ -562,7 +562,7 @@ anonymous: enabled: false `), }, - expectErr: "anonymous is not supported when AnonymousAuthConfigurableEnpoints feature gate is disabled", + expectErr: "anonymous is not supported when AnonymousAuthConfigurableEndpoints feature gate is disabled", }, { name: "file-anonymous-disabled-AnonymousAuthConfigurableEndpoints-enabled", diff --git a/staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go b/staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go index c81faca78ce..be85d4f3d71 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/apiserver/validation/validation.go @@ -79,7 +79,7 @@ func ValidateAuthenticationConfiguration(compiler authenticationcel.Compiler, c if c.Anonymous != nil { if !utilfeature.DefaultFeatureGate.Enabled(features.AnonymousAuthConfigurableEndpoints) { - allErrs = append(allErrs, field.Forbidden(field.NewPath("anonymous"), "anonymous is not supported when AnonymousAuthConfigurableEnpoints feature gate is disabled")) + allErrs = append(allErrs, field.Forbidden(field.NewPath("anonymous"), "anonymous is not supported when AnonymousAuthConfigurableEndpoints 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"))