File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ func (b *KubeControllerManagerOptionsBuilder) BuildOptions(o *kops.Cluster) erro
111
111
networking := & clusterSpec .Networking
112
112
if networking .Kubenet != nil {
113
113
kcm .ConfigureCloudRoutes = fi .PtrTo (true )
114
- } else if gce . UsesIPAliases ( o ) {
114
+ } else if networking . GCP != nil {
115
115
kcm .ConfigureCloudRoutes = fi .PtrTo (false )
116
116
if kcm .CloudProvider == "external" {
117
117
// 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
126
126
} else if networking .Kopeio != nil {
127
127
// Kopeio is based on kubenet / external
128
128
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
+ }
129
137
} else {
130
138
return fmt .Errorf ("no networking mode set" )
131
139
}
You can’t perform that action at this time.
0 commit comments