mirror of https://github.com/kubernetes/kops.git
Merge pull request #13187 from jiahuif-forks/feature/enable-leader-election
Always enable Leader Election for cloud-controller-manager
This commit is contained in:
commit
70f3a2ec7f
|
@ -49,6 +49,10 @@ func (b *AWSCloudControllerManagerOptionsBuilder) BuildOptions(o interface{}) er
|
|||
return nil
|
||||
}
|
||||
|
||||
// No significant downside to always doing a leader election.
|
||||
// Also, having multiple control plane nodes requires leader election.
|
||||
eccm.LeaderElection = &kops.LeaderElectionConfiguration{LeaderElect: fi.Bool(true)}
|
||||
|
||||
eccm.ClusterName = b.ClusterName
|
||||
|
||||
eccm.ClusterCIDR = clusterSpec.NonMasqueradeCIDR
|
||||
|
|
|
@ -45,6 +45,11 @@ func (b *GCPCloudControllerManagerOptionsBuilder) BuildOptions(options interface
|
|||
if ccmConfig == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// No significant downside to always doing a leader election.
|
||||
// Also, having multiple control plane nodes requires leader election.
|
||||
ccmConfig.LeaderElection = &kops.LeaderElectionConfiguration{LeaderElect: fi.Bool(true)}
|
||||
|
||||
// CCM interacts directly with the GCP API, use the name safe for GCP
|
||||
ccmConfig.ClusterName = gce.SafeClusterName(b.ClusterName)
|
||||
ccmConfig.AllocateNodeCIDRs = fi.Bool(true)
|
||||
|
|
|
@ -25,6 +25,8 @@ spec:
|
|||
clusterName: minimal.example.com
|
||||
configureCloudRoutes: false
|
||||
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.21.0-alpha.0
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
cloudProvider: aws
|
||||
clusterAutoscaler:
|
||||
awsUseStaticInstanceList: false
|
||||
|
|
|
@ -23,6 +23,8 @@ spec:
|
|||
clusterName: minimal.example.com
|
||||
configureCloudRoutes: false
|
||||
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.23.0-alpha.0
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
cloudProvider: aws
|
||||
clusterAutoscaler:
|
||||
awsUseStaticInstanceList: false
|
||||
|
|
|
@ -25,6 +25,8 @@ spec:
|
|||
clusterName: minimal.example.com
|
||||
configureCloudRoutes: false
|
||||
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.21.0-alpha.0
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
cloudProvider: aws
|
||||
clusterAutoscaler:
|
||||
awsUseStaticInstanceList: false
|
||||
|
|
|
@ -21,6 +21,8 @@ spec:
|
|||
configureCloudRoutes: false
|
||||
enableLeaderMigration: true
|
||||
image: gcr.io/k8s-staging-provider-aws/cloud-controller-manager:latest
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
cloudProvider: aws
|
||||
clusterDNSDomain: cluster.local
|
||||
configBase: memfs://tests/minimal.example.com
|
||||
|
|
|
@ -25,6 +25,8 @@ spec:
|
|||
clusterName: minimal-ipv6.example.com
|
||||
configureCloudRoutes: false
|
||||
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.21.0-alpha.0
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
cloudProvider: aws
|
||||
clusterDNSDomain: cluster.local
|
||||
configBase: memfs://clusters.example.com/minimal-ipv6.example.com
|
||||
|
|
|
@ -25,6 +25,8 @@ spec:
|
|||
clusterName: minimal-ipv6.example.com
|
||||
configureCloudRoutes: false
|
||||
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.21.0-alpha.0
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
cloudProvider: aws
|
||||
clusterDNSDomain: cluster.local
|
||||
configBase: memfs://clusters.example.com/minimal-ipv6.example.com
|
||||
|
|
|
@ -25,6 +25,8 @@ spec:
|
|||
clusterName: minimal-ipv6.example.com
|
||||
configureCloudRoutes: false
|
||||
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.23.0-alpha.0
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
cloudProvider: aws
|
||||
clusterDNSDomain: cluster.local
|
||||
configBase: memfs://clusters.example.com/minimal-ipv6.example.com
|
||||
|
|
|
@ -25,6 +25,8 @@ spec:
|
|||
clusterName: minimal-ipv6.example.com
|
||||
configureCloudRoutes: false
|
||||
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.21.0-alpha.0
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
cloudProvider: aws
|
||||
clusterDNSDomain: cluster.local
|
||||
configBase: memfs://clusters.example.com/minimal-ipv6.example.com
|
||||
|
|
Loading…
Reference in New Issue