File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -211,10 +211,15 @@ func apiServer(ctx context.Context, cfg *config.Control) error {
211211 argsMap ["cert-dir" ] = certDir
212212 argsMap ["allow-privileged" ] = "true"
213213 argsMap ["enable-bootstrap-token-auth" ] = "true"
214- if authConfigFile := util .ArgValue ("authorization-config" , cfg .ExtraAPIArgs ); authConfigFile == "" {
215- logrus .Warn ("Not setting kube-apiserver 'authorization-mode' and 'anonymous-auth' flags due to user-provided 'authorization-config' file." )
214+ if util .ArgValue ("authorization-config" , cfg .ExtraAPIArgs ) == "" {
216215 argsMap ["authorization-mode" ] = strings .Join ([]string {modes .ModeNode , modes .ModeRBAC }, "," )
216+ } else {
217+ logrus .Warn ("Not setting kube-apiserver 'authorization-mode' flag due to user-provided 'authorization-config' file." )
218+ }
219+ if util .ArgValue ("authentication-config" , cfg .ExtraAPIArgs ) == "" {
217220 argsMap ["anonymous-auth" ] = "false"
221+ } else {
222+ logrus .Warn ("Not setting kube-apiserver 'anonymous-auth' flag due to user-provided 'authentication-config' file." )
218223 }
219224 argsMap ["service-account-signing-key-file" ] = runtime .ServiceCurrentKey
220225 argsMap ["service-cluster-ip-range" ] = util .JoinIPNets (cfg .ServiceIPRanges )
You can’t perform that action at this time.
0 commit comments