File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,10 +166,11 @@ func ManagerInit(ctx *ManagerInitCtx) error {
166166 }
167167
168168 s := strings .Split (ctx .PodClientCertPath , "," )
169+ cert := strings .TrimSpace (s [0 ])
169170 if len (s ) == 1 {
170- ctx .podClientCertPath , ctx .podClientCertKey = strings . TrimSpace ( s [ 0 ]), strings . TrimSpace ( s [ 0 ])
171+ ctx .podClientCertPath , ctx .podClientCertKey = cert , cert
171172 } else if len (s ) >= 2 {
172- ctx .podClientCertPath , ctx .podClientCertKey = strings . TrimSpace ( s [ 0 ]) , strings .TrimSpace (s [1 ])
173+ ctx .podClientCertPath , ctx .podClientCertKey = cert , strings .TrimSpace (s [1 ])
173174 }
174175
175176 err := kubeletPodListPortCacheUpdate (ctx )
@@ -524,7 +525,10 @@ func kubeletConfigCacheUpdate(ctx *ManagerInitCtx) error {
524525
525526 config , err = kubeletConfigFileDefault ()
526527 if err != nil {
527- panic (fmt .Sprintf ("we cannot find any cgroup driver of kubelet after requesting configz and default files: %v" , err ))
528+ panic (fmt .Sprintf (
529+ "we cannot find any cgroup driver of kubelet after requesting configz and default files: %v" ,
530+ err ,
531+ ))
528532 }
529533
530534 return nil
You can’t perform that action at this time.
0 commit comments