mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
cmd/k8s-operator: strip credentials from client config in noauth mode
Updates tailscale/corp#15526 Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
0ee4573a41
commit
37863205ec
@ -91,6 +91,9 @@ func maybeLaunchAPIServerProxy(zlog *zap.SugaredLogger, restConfig *rest.Config,
|
|||||||
}
|
}
|
||||||
hostinfo.SetApp("k8s-operator-proxy")
|
hostinfo.SetApp("k8s-operator-proxy")
|
||||||
startlog := zlog.Named("launchAPIProxy")
|
startlog := zlog.Named("launchAPIProxy")
|
||||||
|
if mode == apiserverProxyModeNoAuth {
|
||||||
|
restConfig = rest.AnonymousClientConfig(restConfig)
|
||||||
|
}
|
||||||
cfg, err := restConfig.TransportConfig()
|
cfg, err := restConfig.TransportConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
startlog.Fatalf("could not get rest.TransportConfig(): %v", err)
|
startlog.Fatalf("could not get rest.TransportConfig(): %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user