mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
kubeapiserver: rename --experimental-bootstrap-token-auth
to --enable-bootstrap-token-auth
.
This change renames the `--experimental-bootstrap-token-auth` flag to `--enable-bootstrap-token-auth`. The old flag is accepted but generates a warning. In 1.9, we will drop support for `--experimental-bootstrap-token-auth` entirely.
This commit is contained in:
parent
071c8870d9
commit
9dad15e220
@ -51,7 +51,7 @@ type AnonymousAuthenticationOptions struct {
|
||||
}
|
||||
|
||||
type BootstrapTokenAuthenticationOptions struct {
|
||||
Allow bool
|
||||
Enable bool
|
||||
}
|
||||
|
||||
type KeystoneAuthenticationOptions struct {
|
||||
@ -178,7 +178,11 @@ func (s *BuiltInAuthenticationOptions) AddFlags(fs *pflag.FlagSet) {
|
||||
}
|
||||
|
||||
if s.BootstrapToken != nil {
|
||||
fs.BoolVar(&s.BootstrapToken.Allow, "experimental-bootstrap-token-auth", s.BootstrapToken.Allow, ""+
|
||||
fs.BoolVar(&s.BootstrapToken.Enable, "experimental-bootstrap-token-auth", s.BootstrapToken.Enable, ""+
|
||||
"Deprecated (use --enable-bootstrap-token-auth).")
|
||||
fs.MarkDeprecated("experimental-bootstrap-token-auth", "use --enable-bootstrap-token-auth instead.")
|
||||
|
||||
fs.BoolVar(&s.BootstrapToken.Enable, "enable-bootstrap-token-auth", s.BootstrapToken.Enable, ""+
|
||||
"Enable to allow secrets of type 'bootstrap.kubernetes.io/token' in the 'kube-system' "+
|
||||
"namespace to be used for TLS bootstrapping authentication.")
|
||||
}
|
||||
@ -266,7 +270,7 @@ func (s *BuiltInAuthenticationOptions) ToAuthenticationConfig() authenticator.Au
|
||||
}
|
||||
|
||||
if s.BootstrapToken != nil {
|
||||
ret.BootstrapToken = s.BootstrapToken.Allow
|
||||
ret.BootstrapToken = s.BootstrapToken.Enable
|
||||
}
|
||||
|
||||
if s.ClientCert != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user