You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request kubernetes#67836 from sttts/sttts-non-fatal-missing-external-apiserver-authn-configmap
Automatic merge from submit-queue (batch tested with PRs 67764, 68034, 67836). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.
apiserver: make not-found external-apiserver-authn configmap non-fatal
As client-ca and requestheader-client-ca is optional in the external-apiserver-authentication config file and components like kube-controller-manager and kube-scheduler won't need that anyway, we better make it non-fatal if the configmap is not found in the cluster.
Consumer counter-part PR to kubernetes#67694.
```release-note
Don't let aggregated apiservers fail to launch if the external-apiserver-authentication configmap is not found in the cluster.
```
glog.Warningf("Cluster doesn't provide client-ca-file in configmap/%s in %s, so client certificate authentication to extension api-server won't work.", authenticationConfigMapName, authenticationConfigMapNamespace)
255
-
} else {
256
-
s.ClientCert=*opt
257
266
}
258
267
}
259
268
260
269
iflen(s.RequestHeader.ClientCAFile) ==0 {
261
-
opt, err:=inClusterRequestHeader(authConfigMap)
262
-
iferr!=nil {
263
-
returnerr
270
+
ifauthConfigMap!=nil {
271
+
opt, err:=inClusterRequestHeader(authConfigMap)
272
+
iferr!=nil {
273
+
returnerr
274
+
}
275
+
ifopt!=nil {
276
+
s.RequestHeader=*opt
277
+
}
264
278
}
265
-
ifopt==nil {
279
+
iflen(s.RequestHeader.ClientCAFile)==0 {
266
280
glog.Warningf("Cluster doesn't provide requestheader-client-ca-file in configmap/%s in %s, so request-header client certificate authentication to extension api-server won't work.", authenticationConfigMapName, authenticationConfigMapNamespace)
0 commit comments