mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #37442 from NickrenREN/kubelet-run
Automatic merge from submit-queue (batch tested with PRs 37094, 37663, 37442, 37808, 37826) fix if condition question in kubelet run() function Here variable err returned by function NewForConfig(&eventClientConfig) if CreateAPIServerClientConfig() function runs correctly . And we should not print "invalid kubeconfig" info. Should we use else instead of if.
This commit is contained in:
commit
caa935df45
@ -392,8 +392,7 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.KubeletDeps) (err error) {
|
||||
eventClientConfig.QPS = float32(s.EventRecordQPS)
|
||||
eventClientConfig.Burst = int(s.EventBurst)
|
||||
eventClient, err = clientset.NewForConfig(&eventClientConfig)
|
||||
}
|
||||
if err != nil {
|
||||
} else {
|
||||
if s.RequireKubeConfig {
|
||||
return fmt.Errorf("invalid kubeconfig: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user