@@ -61,8 +61,7 @@ type leaderElection struct {
61
61
// the namespace to store the lock resource
62
62
namespace string
63
63
// resourceLock defines the type of leaderelection that should be used
64
- // valid options are resourcelock.LeasesResourceLock, resourcelock.EndpointsResourceLock,
65
- // and resourcelock.ConfigMapsResourceLock
64
+ // Only resourcelock.LeasesResourceLock is valid at the moment.
66
65
resourceLock string
67
66
// healthCheck reports unhealthy if leader election fails to renew leadership
68
67
// within a timeout period.
@@ -95,32 +94,6 @@ func NewLeaderElectionWithLeases(clientset kubernetes.Interface, lockName string
95
94
}
96
95
}
97
96
98
- // NewLeaderElectionWithEndpoints returns an implementation of leader election using Endpoints
99
- func NewLeaderElectionWithEndpoints (clientset kubernetes.Interface , lockName string , runFunc func (ctx context.Context )) * leaderElection {
100
- return & leaderElection {
101
- runFunc : runFunc ,
102
- lockName : lockName ,
103
- resourceLock : resourcelock .EndpointsResourceLock ,
104
- leaseDuration : defaultLeaseDuration ,
105
- renewDeadline : defaultRenewDeadline ,
106
- retryPeriod : defaultRetryPeriod ,
107
- clientset : clientset ,
108
- }
109
- }
110
-
111
- // NewLeaderElectionWithConfigMaps returns an implementation of leader election using ConfigMaps
112
- func NewLeaderElectionWithConfigMaps (clientset kubernetes.Interface , lockName string , runFunc func (ctx context.Context )) * leaderElection {
113
- return & leaderElection {
114
- runFunc : runFunc ,
115
- lockName : lockName ,
116
- resourceLock : resourcelock .ConfigMapsResourceLock ,
117
- leaseDuration : defaultLeaseDuration ,
118
- renewDeadline : defaultRenewDeadline ,
119
- retryPeriod : defaultRetryPeriod ,
120
- clientset : clientset ,
121
- }
122
- }
123
-
124
97
func (l * leaderElection ) WithIdentity (identity string ) {
125
98
l .identity = identity
126
99
}
0 commit comments