mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
Add lock type flags for controller-manager leadership election
This commit is contained in:
committed by
Timothy St. Clair
parent
5a1ec9bf6f
commit
a2248a2bcd
@@ -685,6 +685,9 @@ type LeaderElectionConfiguration struct {
|
||||
// acquisition and renewal of a leadership. This is only applicable if
|
||||
// leader election is enabled.
|
||||
RetryPeriod metav1.Duration
|
||||
// LockType indicates the type of locking to use for leadership election.
|
||||
// Supported options are `endpoints` (default) and `configmap`.
|
||||
LockType string
|
||||
}
|
||||
|
||||
type KubeControllerManagerConfiguration struct {
|
||||
|
||||
@@ -233,6 +233,9 @@ type LeaderElectionConfiguration struct {
|
||||
// acquisition and renewal of a leadership. This is only applicable if
|
||||
// leader election is enabled.
|
||||
RetryPeriod metav1.Duration `json:"retryPeriod"`
|
||||
// LockType indicates the type of locking to use for leadership election.
|
||||
// Supported options are `endpoints` (default) and `configmap`.
|
||||
LockType string
|
||||
}
|
||||
|
||||
// A configuration field should go in KubeletFlags instead of KubeletConfiguration if any of these are true:
|
||||
|
||||
@@ -814,6 +814,7 @@ func autoConvert_v1alpha1_LeaderElectionConfiguration_To_componentconfig_LeaderE
|
||||
out.LeaseDuration = in.LeaseDuration
|
||||
out.RenewDeadline = in.RenewDeadline
|
||||
out.RetryPeriod = in.RetryPeriod
|
||||
out.LockType = in.LockType
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -829,6 +830,7 @@ func autoConvert_componentconfig_LeaderElectionConfiguration_To_v1alpha1_LeaderE
|
||||
out.LeaseDuration = in.LeaseDuration
|
||||
out.RenewDeadline = in.RenewDeadline
|
||||
out.RetryPeriod = in.RetryPeriod
|
||||
out.LockType = in.LockType
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user