From c383823228510e11bf63c07d910ed654efb99b67 Mon Sep 17 00:00:00 2001 From: Abhijit Hoskeri Date: Sat, 27 Jul 2024 13:55:19 -0700 Subject: [PATCH] Fix formatting of the authnz config usage. - Reword to be less verbose, more in line with the writing style in other flags. - Add spaces after the end of sentences. --- pkg/kubeapiserver/options/authentication.go | 9 ++++----- pkg/kubeapiserver/options/authorization.go | 7 +++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pkg/kubeapiserver/options/authentication.go b/pkg/kubeapiserver/options/authentication.go index 05666739265..18502f6ff5c 100644 --- a/pkg/kubeapiserver/options/authentication.go +++ b/pkg/kubeapiserver/options/authentication.go @@ -311,11 +311,10 @@ func (o *BuiltInAuthenticationOptions) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&o.AuthenticationConfigFile, "authentication-config", o.AuthenticationConfigFile, ""+ "File with Authentication Configuration to configure the JWT Token authenticator or the anonymous authenticator. "+ - "Note: This feature is in Alpha since v1.29."+ - "--feature-gate=StructuredAuthenticationConfiguration=true needs to be set for enabling this feature."+ - "This feature is mutually exclusive with the oidc-* flags."+ - "To configure anonymous authenticator you need to enable --feature-gate=AnonymousAuthConfigurableEndpoints."+ - "When you configure anonymous authenticator in the authentication config you cannot use the --anonymous-auth flag.") + "Requires the StructuredAuthenticationConfiguration feature gate. "+ + "Also requires the feature gate AnonymousAuthConfigurableEndpoints to configure the anonymous authenticator in the config file. "+ + "This flag is mutually exclusive with the --oidc-* flags if the file configures the JWT Token authenticator. "+ + "This flag is mutually exclusive with --anonymous-auth if the file configures the Anonymous authenticator.") fs.StringSliceVar(&o.APIAudiences, "api-audiences", o.APIAudiences, ""+ "Identifiers of the API. The service account token authenticator will validate that "+ diff --git a/pkg/kubeapiserver/options/authorization.go b/pkg/kubeapiserver/options/authorization.go index dd50323eebe..8b7f26c55c1 100644 --- a/pkg/kubeapiserver/options/authorization.go +++ b/pkg/kubeapiserver/options/authorization.go @@ -188,10 +188,9 @@ func (o *BuiltInAuthorizationOptions) AddFlags(fs *pflag.FlagSet) { "The duration to cache 'unauthorized' responses from the webhook authorizer.") fs.StringVar(&o.AuthorizationConfigurationFile, authorizationConfigFlag, o.AuthorizationConfigurationFile, ""+ - "File with Authorization Configuration to configure the authorizer chain."+ - "Note: This feature is in Alpha since v1.29."+ - "--feature-gate=StructuredAuthorizationConfiguration=true feature flag needs to be set to true for enabling the functionality."+ - "This feature is mutually exclusive with the other --authorization-mode and --authorization-webhook-* flags.") + "File with Authorization Configuration to configure the authorizer chain. "+ + "Requires feature gate StructuredAuthorizationConfiguration. "+ + "This flag is mutually exclusive with the other --authorization-mode and --authorization-webhook-* flags.") // preserves compatibility with any method set during initialization oldAreLegacyFlagsSet := o.AreLegacyFlagsSet