Merge pull request #65094 from hzxuzhonghu/le-client-timeout
Automatic merge from submit-queue (batch tested with PRs 65094, 65533, 63522, 65694, 65702). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. set leader election client and renew timeout **What this PR does / why we need it**: set leader-election client timeout set timeout for tryAcquireOrRenew **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #65090 #65257 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
@@ -436,7 +436,10 @@ func (s KubeControllerManagerOptions) Config(allControllers []string, disabledBy
|
||||
return nil, err
|
||||
}
|
||||
|
||||
leaderElectionClient := clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, "leader-election"))
|
||||
// shallow copy, do not modify the kubeconfig.Timeout.
|
||||
config := *kubeconfig
|
||||
config.Timeout = s.GenericComponent.LeaderElection.RenewDeadline.Duration
|
||||
leaderElectionClient := clientset.NewForConfigOrDie(restclient.AddUserAgent(&config, "leader-election"))
|
||||
|
||||
eventRecorder := createRecorder(client, KubeControllerManagerUserAgent)
|
||||
|
||||
|
Reference in New Issue
Block a user