cmd/k8s-operator: strip credentials from client config in noauth mode

Updates tailscale/corp#15526

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/10038/head
David Anderson 1 year ago committed by Dave Anderson
parent 0ee4573a41
commit 37863205ec

@ -91,6 +91,9 @@ func maybeLaunchAPIServerProxy(zlog *zap.SugaredLogger, restConfig *rest.Config,
}
hostinfo.SetApp("k8s-operator-proxy")
startlog := zlog.Named("launchAPIProxy")
if mode == apiserverProxyModeNoAuth {
restConfig = rest.AnonymousClientConfig(restConfig)
}
cfg, err := restConfig.TransportConfig()
if err != nil {
startlog.Fatalf("could not get rest.TransportConfig(): %v", err)

Loading…
Cancel
Save