Skip to content

Commit

Permalink
fix controller lease (#172)
Browse files Browse the repository at this point in the history
Signed-off-by: ii2day <ji.li@daocloud.io>
  • Loading branch information
ii2day committed Aug 31, 2023
1 parent b3190f8 commit 5113832
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/pluginManager/controllerManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (s *pluginManager) RunControllerController(healthPort int, webhookPort int,
// lease
LeaderElection: true,
LeaderElectionNamespace: types.ControllerConfig.PodNamespace,
LeaderElectionID: types.ControllerConfig.PodName,
LeaderElectionID: types.KdoctorControllerElectorLockName,
// for this not watched obj, get directly from api-server
ClientDisableCacheFor: []client.Object{
&corev1.Node{},
Expand Down
2 changes: 2 additions & 0 deletions pkg/types/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const (
)

const (
KdoctorControllerElectorLockName = "kdoctor-controller-lease"

KindNameAppHttpHealthy = "AppHttpHealthy"
KindNameNetReach = "NetReach"
KindNameNetdns = "Netdns"
Expand Down

0 comments on commit 5113832

Please sign in to comment.