mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #97000 from mlevesquedion/avoid-logging-headers
Avoid logging headers from kubelet configuration
This commit is contained in:
commit
983cac7f96
@ -263,8 +263,15 @@ HTTP server: The kubelet can also listen for HTTP and respond to a simple API
|
||||
// set up signal context here in order to be reused by kubelet and docker shim
|
||||
ctx := genericapiserver.SetupSignalContext()
|
||||
|
||||
// make the kubelet's config safe for logging
|
||||
config := kubeletServer.KubeletConfiguration.DeepCopy()
|
||||
for k := range config.StaticPodURLHeader {
|
||||
config.StaticPodURLHeader[k] = []string{"<masked>"}
|
||||
}
|
||||
// log the kubelet's config for inspection
|
||||
klog.V(5).Infof("KubeletConfiguration: %#v", config)
|
||||
|
||||
// run the kubelet
|
||||
klog.V(5).Infof("KubeletConfiguration: %#v", kubeletServer.KubeletConfiguration)
|
||||
if err := Run(ctx, kubeletServer, kubeletDeps, utilfeature.DefaultFeatureGate); err != nil {
|
||||
klog.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user