diff --git a/pkg/pluginManager/controllerManager.go b/pkg/pluginManager/controllerManager.go index 3e406937..e69d108d 100644 --- a/pkg/pluginManager/controllerManager.go +++ b/pkg/pluginManager/controllerManager.go @@ -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{}, diff --git a/pkg/types/const.go b/pkg/types/const.go index 0c5a6766..daa46761 100644 --- a/pkg/types/const.go +++ b/pkg/types/const.go @@ -7,6 +7,8 @@ const ( ) const ( + KdoctorControllerElectorLockName = "kdoctor-controller-lease" + KindNameAppHttpHealthy = "AppHttpHealthy" KindNameNetReach = "NetReach" KindNameNetdns = "Netdns"