Skip to content

Commit 670c065

Browse files
committed
fixup! WIP: kindnet + ipalias
1 parent 3c0b091 commit 670c065

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkg/model/components/kubecontrollermanager.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (b *KubeControllerManagerOptionsBuilder) BuildOptions(o *kops.Cluster) erro
111111
networking := &clusterSpec.Networking
112112
if networking.Kubenet != nil {
113113
kcm.ConfigureCloudRoutes = fi.PtrTo(true)
114-
} else if gce.UsesIPAliases(o) {
114+
} else if networking.GCP != nil {
115115
kcm.ConfigureCloudRoutes = fi.PtrTo(false)
116116
if kcm.CloudProvider == "external" {
117117
// kcm should not allocate node cidrs with the CloudAllocator if we're using the external CCM
@@ -126,6 +126,14 @@ func (b *KubeControllerManagerOptionsBuilder) BuildOptions(o *kops.Cluster) erro
126126
} else if networking.Kopeio != nil {
127127
// Kopeio is based on kubenet / external
128128
kcm.ConfigureCloudRoutes = fi.PtrTo(false)
129+
} else if networking.Kindnet != nil {
130+
// We don't expect KCM to configure routes; it should be done by the CCM (or by the infrastructure)
131+
kcm.ConfigureCloudRoutes = fi.PtrTo(false)
132+
133+
// If the cloud is allocating the node CIDRs, that should be done by CCM
134+
if o.GetCloudProvider() == kops.CloudProviderGCE && gce.UsesIPAliases(o) {
135+
kcm.AllocateNodeCIDRs = fi.PtrTo(false)
136+
}
129137
} else {
130138
return fmt.Errorf("no networking mode set")
131139
}

0 commit comments

Comments
 (0)