Skip to content

Commit 3dc7a34

Browse files
modular-magicianEmily Cai
and
Emily Cai
authored
fix networking_mode in container_cluster (#5504) (#10686)
Co-authored-by: Emily Cai <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: Emily Cai <[email protected]>
1 parent 053337b commit 3dc7a34

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.changelog/5504.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
container: fixed the `ROUTES` value for the `networking_mode` field in `google_container_cluster`. A recent API change unintentionally changed the default to a `VPC_NATIVE` cluster, and removed the ability to create a `ROUTES`-based one. Provider versions prior to this one will default to `VPC_NATIVE` due to this change, and are unable to create `ROUTES` clusters.
3+
```

google/resource_container_cluster.go

+1
Original file line numberDiff line numberDiff line change
@@ -2553,6 +2553,7 @@ func expandIPAllocationPolicy(configured interface{}, networkingMode string) (*c
25532553
}
25542554
return &container.IPAllocationPolicy{
25552555
UseIpAliases: false,
2556+
UseRoutes: true,
25562557
ForceSendFields: []string{"UseIpAliases"},
25572558
}, nil
25582559
}

website/docs/r/container_cluster.html.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ VPC-native clusters. Adding this block enables [IP aliasing](https://cloud.googl
180180
making the cluster VPC-native instead of routes-based. Structure is [documented
181181
below](#nested_ip_allocation_policy).
182182

183-
* `networking_mode` - (Optional, [Beta]) Determines whether alias IPs or routes will be used for pod IPs in the cluster.
183+
* `networking_mode` - (Optional) Determines whether alias IPs or routes will be used for pod IPs in the cluster.
184184
Options are `VPC_NATIVE` or `ROUTES`. `VPC_NATIVE` enables [IP aliasing](https://cloud.google.com/kubernetes-engine/docs/how-to/ip-aliases),
185185
and requires the `ip_allocation_policy` block to be defined. By default when this field is unspecified, GKE will create a `ROUTES`-based cluster.
186186

0 commit comments

Comments
 (0)