From 58b553734cc57c7d7082fb261ea2122bb3515fec Mon Sep 17 00:00:00 2001 From: Daniel Seymour Date: Mon, 25 Mar 2019 14:48:56 -0700 Subject: [PATCH 1/2] Add upgrade guide to README --- README.md | 6 ++++++ autogen/README.md | 6 ++++++ modules/private-cluster/README.md | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 35be5d8a87..e46bcb2659 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,12 @@ Then perform the following commands on the root folder: - `terraform apply` to apply the infrastructure build - `terraform destroy` to destroy the built infrastructure +## Upgrade to v1.0.0 + +Version 1.0.0 of this module introduces a breaking change: adding the `disable-legacy-endpoints` metadata field to all node pools. This metadata is required by GKE and [determines whether the `/0.1/` and `/v1beta1/` paths are available in the nodes' metadata server](https://cloud.google.com/kubernetes-engine/docs/how-to/protecting-cluster-metadata#disable-legacy-apis). If your applications do not require access to the node's metadata server, you can leave the default value of `true` provided by the module. If your applications require access to the metadata server, be sure to read the linked documentation to see if you need to set the value for this field to `false` to allow your applications access to the above metadata server paths. + +In either case, upgrading to module version `v1.0.0` will trigger a recreation of all node pools in the cluster. + [^]: (autogen_docs_start) ## Inputs diff --git a/autogen/README.md b/autogen/README.md index 1f945e68c8..caca32666a 100644 --- a/autogen/README.md +++ b/autogen/README.md @@ -95,6 +95,12 @@ Then perform the following commands on the root folder: - `terraform apply` to apply the infrastructure build - `terraform destroy` to destroy the built infrastructure +## Upgrade to v1.0.0 + +Version 1.0.0 of this module introduces a breaking change: adding the `disable-legacy-endpoints` metadata field to all node pools. This metadata is required by GKE and [determines whether the `/0.1/` and `/v1beta1/` paths are available in the nodes' metadata server](https://cloud.google.com/kubernetes-engine/docs/how-to/protecting-cluster-metadata#disable-legacy-apis). If your applications do not require access to the node's metadata server, you can leave the default value of `true` provided by the module. If your applications require access to the metadata server, be sure to read the linked documentation to see if you need to set the value for this field to `false` to allow your applications access to the above metadata server paths. + +In either case, upgrading to module version `v1.0.0` will trigger a recreation of all node pools in the cluster. + [^]: (autogen_docs_start) [^]: (autogen_docs_end) diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index 9b09bf0090..eb8af7d8b5 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -92,6 +92,12 @@ Then perform the following commands on the root folder: - `terraform apply` to apply the infrastructure build - `terraform destroy` to destroy the built infrastructure +## Upgrade to v1.0.0 + +Version 1.0.0 of this module introduces a breaking change: adding the `disable-legacy-endpoints` metadata field to all node pools. This metadata is required by GKE and [determines whether the `/0.1/` and `/v1beta1/` paths are available in the nodes' metadata server](https://cloud.google.com/kubernetes-engine/docs/how-to/protecting-cluster-metadata#disable-legacy-apis). If your applications do not require access to the node's metadata server, you can leave the default value of `true` provided by the module. If your applications require access to the metadata server, be sure to read the linked documentation to see if you need to set the value for this field to `false` to allow your applications access to the above metadata server paths. + +In either case, upgrading to module version `v1.0.0` will trigger a recreation of all node pools in the cluster. + [^]: (autogen_docs_start) ## Inputs From 50c68b74fb35a829a7ea2c2bce3ad62348f368c4 Mon Sep 17 00:00:00 2001 From: Daniel Seymour Date: Mon, 25 Mar 2019 14:30:44 -0700 Subject: [PATCH 2/2] Update documentation and fix skew between autogenerated code and templates --- README.md | 1 + autogen/main.tf | 1 - modules/private-cluster/README.md | 1 + modules/private-cluster/variables.tf | 2 +- variables.tf | 2 +- 5 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e46bcb2659..6fece407ce 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| | description | The description of the cluster | string | `""` | no | +| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | string | `"true"` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | string | `"true"` | no | | http\_load\_balancing | Enable httpload balancer addon | string | `"true"` | no | | ip\_masq\_link\_local | Whether to masquerade traffic to the link-local prefix (169.254.0.0/16). | string | `"false"` | no | diff --git a/autogen/main.tf b/autogen/main.tf index 18187d2ac0..c803eedc4f 100644 --- a/autogen/main.tf +++ b/autogen/main.tf @@ -157,7 +157,6 @@ data "google_container_engine_versions" "region" { } data "google_container_engine_versions" "zone" { - provider = "google-beta" // Work around to prevent a lack of zone declaration from causing regional cluster creation from erroring out due to error // // data.google_container_engine_versions.zone: Cannot determine zone: set in this resource, or set provider-level zone. diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index eb8af7d8b5..e3eeb194cf 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -105,6 +105,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| | description | The description of the cluster | string | `""` | no | +| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | string | `"true"` | no | | enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | string | `"false"` | no | | enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | string | `"false"` | no | | horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | string | `"true"` | no | diff --git a/modules/private-cluster/variables.tf b/modules/private-cluster/variables.tf index 2bc5ca2543..5bef1d19cf 100644 --- a/modules/private-cluster/variables.tf +++ b/modules/private-cluster/variables.tf @@ -126,7 +126,7 @@ variable "remove_default_node_pool" { variable "disable_legacy_metadata_endpoints" { description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated." - default = true + default = "true" } diff --git a/variables.tf b/variables.tf index 3582e5a55e..0977e831ad 100644 --- a/variables.tf +++ b/variables.tf @@ -126,7 +126,7 @@ variable "remove_default_node_pool" { variable "disable_legacy_metadata_endpoints" { description = "Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated." - default = true + default = "true" }