Add lock type flags for controller-manager leadership election

This commit is contained in:
Jamie Hannaford
2017-05-05 14:01:59 +02:00
committed by Timothy St. Clair
parent 5a1ec9bf6f
commit a2248a2bcd
6 changed files with 53 additions and 15 deletions

View File

@@ -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 {

View File

@@ -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:

View File

@@ -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
}