Skip to content

Commit

Permalink
fix networking_mode in container_cluster (#5504) (#10686)
Browse files Browse the repository at this point in the history
Co-authored-by: Emily Cai <[email protected]>
Signed-off-by: Modular Magician <[email protected]>

Co-authored-by: Emily Cai <[email protected]>
  • Loading branch information
modular-magician and Emily Cai authored Dec 3, 2021
1 parent 053337b commit 3dc7a34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/5504.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
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.
```
1 change: 1 addition & 0 deletions google/resource_container_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2553,6 +2553,7 @@ func expandIPAllocationPolicy(configured interface{}, networkingMode string) (*c
}
return &container.IPAllocationPolicy{
UseIpAliases: false,
UseRoutes: true,
ForceSendFields: []string{"UseIpAliases"},
}, nil
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/container_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ VPC-native clusters. Adding this block enables [IP aliasing](https://cloud.googl
making the cluster VPC-native instead of routes-based. Structure is [documented
below](#nested_ip_allocation_policy).

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

Expand Down

0 comments on commit 3dc7a34

Please sign in to comment.