Skip to content

Commit 3c8dd3a

Browse files
authored
fix!: set release_channel and auto_upgrade, drop meshtelemetry (#1618)
1 parent a42ed88 commit 3c8dd3a

File tree

34 files changed

+71
-52
lines changed

34 files changed

+71
-52
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Then perform the following commands on the root folder:
200200
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
201201
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
202202
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
203-
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`. | `string` | `null` | no |
203+
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`. | `string` | `"REGULAR"` | no |
204204
| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | `bool` | `false` | no |
205205
| resource\_usage\_export\_dataset\_id | The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export. | `string` | `""` | no |
206206
| service\_account | The service account to run nodes as if not overridden in `node_pools`. The create\_service\_account variable default value (true) will cause a cluster-specific service account to be created. This service account should already exists and it will be used by the node pools. If you wish to only override the service account name, you can use service\_account\_name variable. | `string` | `""` | no |

Diff for: autogen/main/main.tf.tmpl

+2-6
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,8 @@ locals {
7979
cluster_type = var.regional ? "regional" : "zonal"
8080
{% if autopilot_cluster != true %}
8181
// auto upgrade by defaults only for regional cluster as long it has multiple masters versus zonal clusters have only have a single master so upgrades are more dangerous.
82-
{% if beta_cluster %}
83-
// When a release channel is used, node auto-upgrade are enabled and cannot be disabled.
84-
default_auto_upgrade = var.regional || var.release_channel != null ? true : false
85-
{% else %}
86-
default_auto_upgrade = var.regional ? true : false
87-
{% endif %}
82+
// When a release channel is used, node auto-upgrade is enabled and cannot be disabled.
83+
default_auto_upgrade = var.regional || var.release_channel != "UNSPECIFIED" ? true : false
8884
{% endif %}
8985

9086
cluster_subnet_cidr = var.add_cluster_firewall_rules ? data.google_compute_subnetwork.gke_subnetwork[0].ip_cidr_range : null

Diff for: autogen/main/variables.tf.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ variable "identity_namespace" {
464464

465465
variable "release_channel" {
466466
type = string
467-
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
468-
default = null
467+
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`."
468+
default = "REGULAR"
469469
}
470470

471471
variable "gateway_api_channel" {

Diff for: autogen/safer-cluster/variables.tf.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ variable "kubernetes_version" {
7373

7474
variable "release_channel" {
7575
type = string
76-
description = "(Beta) The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`."
76+
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`."
7777
default = "REGULAR"
7878
}
7979

Diff for: docs/upgrading_to_v26.0.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Upgrading to v26.0
2+
The v26.0 release of *kubernetes-engine* is a backwards incompatible
3+
release.
4+
5+
### release_channel now defaults to REGULAR
6+
7+
For all clusters `release_channel` now defaults to `REGULAR`, this was already
8+
the default for safer_cluster variants.
9+
10+
To opt out of using a release channel, set `release_channel` to `"UNSPECIFIED"`.
11+
12+
```diff
13+
module "gke" {
14+
- source = "terraform-google-modules/kubernetes-engine"
15+
- version = "~> 25.0"
16+
+ source = "terraform-google-modules/kubernetes-engine"
17+
+ version = "~> 26.0"
18+
...
19+
+ release_channel = "UNSPECIFIED"
20+
}
21+
```

Diff for: main.tf

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ locals {
7070
zone_count = length(var.zones)
7171
cluster_type = var.regional ? "regional" : "zonal"
7272
// auto upgrade by defaults only for regional cluster as long it has multiple masters versus zonal clusters have only have a single master so upgrades are more dangerous.
73-
default_auto_upgrade = var.regional ? true : false
73+
// When a release channel is used, node auto-upgrade is enabled and cannot be disabled.
74+
default_auto_upgrade = var.regional || var.release_channel != "UNSPECIFIED" ? true : false
7475

7576
cluster_subnet_cidr = var.add_cluster_firewall_rules ? data.google_compute_subnetwork.gke_subnetwork[0].ip_cidr_range : null
7677
cluster_alias_ranges_cidr = var.add_cluster_firewall_rules ? { for range in toset(data.google_compute_subnetwork.gke_subnetwork[0].secondary_ip_range) : range.range_name => range.ip_cidr_range } : {}

Diff for: modules/beta-autopilot-private-cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Then perform the following commands on the root folder:
118118
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
119119
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
120120
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
121-
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`. | `string` | `null` | no |
121+
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`. | `string` | `"REGULAR"` | no |
122122
| resource\_usage\_export\_dataset\_id | The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export. | `string` | `""` | no |
123123
| service\_account | The service account to run nodes as if not overridden in `node_pools`. The create\_service\_account variable default value (true) will cause a cluster-specific service account to be created. This service account should already exists and it will be used by the node pools. If you wish to only override the service account name, you can use service\_account\_name variable. | `string` | `""` | no |
124124
| service\_account\_name | The name of the service account that will be created if create\_service\_account is true. If you wish to use an existing service account, use service\_account variable. | `string` | `""` | no |

Diff for: modules/beta-autopilot-private-cluster/variables.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ variable "identity_namespace" {
301301

302302
variable "release_channel" {
303303
type = string
304-
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
305-
default = null
304+
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`."
305+
default = "REGULAR"
306306
}
307307

308308
variable "gateway_api_channel" {

Diff for: modules/beta-autopilot-public-cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Then perform the following commands on the root folder:
107107
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
108108
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
109109
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
110-
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`. | `string` | `null` | no |
110+
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`. | `string` | `"REGULAR"` | no |
111111
| resource\_usage\_export\_dataset\_id | The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export. | `string` | `""` | no |
112112
| service\_account | The service account to run nodes as if not overridden in `node_pools`. The create\_service\_account variable default value (true) will cause a cluster-specific service account to be created. This service account should already exists and it will be used by the node pools. If you wish to only override the service account name, you can use service\_account\_name variable. | `string` | `""` | no |
113113
| service\_account\_name | The name of the service account that will be created if create\_service\_account is true. If you wish to use an existing service account, use service\_account variable. | `string` | `""` | no |

Diff for: modules/beta-autopilot-public-cluster/variables.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ variable "identity_namespace" {
271271

272272
variable "release_channel" {
273273
type = string
274-
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
275-
default = null
274+
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`."
275+
default = "REGULAR"
276276
}
277277

278278
variable "gateway_api_channel" {

Diff for: modules/beta-private-cluster-update-variant/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Then perform the following commands on the root folder:
250250
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
251251
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
252252
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
253-
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`. | `string` | `null` | no |
253+
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`. | `string` | `"REGULAR"` | no |
254254
| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | `bool` | `false` | no |
255255
| resource\_usage\_export\_dataset\_id | The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export. | `string` | `""` | no |
256256
| sandbox\_enabled | (Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it). | `bool` | `false` | no |

Diff for: modules/beta-private-cluster-update-variant/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ locals {
7070
zone_count = length(var.zones)
7171
cluster_type = var.regional ? "regional" : "zonal"
7272
// auto upgrade by defaults only for regional cluster as long it has multiple masters versus zonal clusters have only have a single master so upgrades are more dangerous.
73-
// When a release channel is used, node auto-upgrade are enabled and cannot be disabled.
74-
default_auto_upgrade = var.regional || var.release_channel != null ? true : false
73+
// When a release channel is used, node auto-upgrade is enabled and cannot be disabled.
74+
default_auto_upgrade = var.regional || var.release_channel != "UNSPECIFIED" ? true : false
7575

7676
cluster_subnet_cidr = var.add_cluster_firewall_rules ? data.google_compute_subnetwork.gke_subnetwork[0].ip_cidr_range : null
7777
cluster_alias_ranges_cidr = var.add_cluster_firewall_rules ? { for range in toset(data.google_compute_subnetwork.gke_subnetwork[0].secondary_ip_range) : range.range_name => range.ip_cidr_range } : {}

Diff for: modules/beta-private-cluster-update-variant/variables.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ variable "identity_namespace" {
437437

438438
variable "release_channel" {
439439
type = string
440-
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
441-
default = null
440+
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`."
441+
default = "REGULAR"
442442
}
443443

444444
variable "gateway_api_channel" {

Diff for: modules/beta-private-cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Then perform the following commands on the root folder:
228228
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
229229
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
230230
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
231-
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`. | `string` | `null` | no |
231+
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`. | `string` | `"REGULAR"` | no |
232232
| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | `bool` | `false` | no |
233233
| resource\_usage\_export\_dataset\_id | The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export. | `string` | `""` | no |
234234
| sandbox\_enabled | (Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it). | `bool` | `false` | no |

Diff for: modules/beta-private-cluster/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ locals {
7070
zone_count = length(var.zones)
7171
cluster_type = var.regional ? "regional" : "zonal"
7272
// auto upgrade by defaults only for regional cluster as long it has multiple masters versus zonal clusters have only have a single master so upgrades are more dangerous.
73-
// When a release channel is used, node auto-upgrade are enabled and cannot be disabled.
74-
default_auto_upgrade = var.regional || var.release_channel != null ? true : false
73+
// When a release channel is used, node auto-upgrade is enabled and cannot be disabled.
74+
default_auto_upgrade = var.regional || var.release_channel != "UNSPECIFIED" ? true : false
7575

7676
cluster_subnet_cidr = var.add_cluster_firewall_rules ? data.google_compute_subnetwork.gke_subnetwork[0].ip_cidr_range : null
7777
cluster_alias_ranges_cidr = var.add_cluster_firewall_rules ? { for range in toset(data.google_compute_subnetwork.gke_subnetwork[0].secondary_ip_range) : range.range_name => range.ip_cidr_range } : {}

Diff for: modules/beta-private-cluster/variables.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ variable "identity_namespace" {
437437

438438
variable "release_channel" {
439439
type = string
440-
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
441-
default = null
440+
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`."
441+
default = "REGULAR"
442442
}
443443

444444
variable "gateway_api_channel" {

Diff for: modules/beta-public-cluster-update-variant/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ Then perform the following commands on the root folder:
239239
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
240240
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
241241
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
242-
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`. | `string` | `null` | no |
242+
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`. | `string` | `"REGULAR"` | no |
243243
| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | `bool` | `false` | no |
244244
| resource\_usage\_export\_dataset\_id | The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export. | `string` | `""` | no |
245245
| sandbox\_enabled | (Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it). | `bool` | `false` | no |

Diff for: modules/beta-public-cluster-update-variant/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ locals {
7070
zone_count = length(var.zones)
7171
cluster_type = var.regional ? "regional" : "zonal"
7272
// auto upgrade by defaults only for regional cluster as long it has multiple masters versus zonal clusters have only have a single master so upgrades are more dangerous.
73-
// When a release channel is used, node auto-upgrade are enabled and cannot be disabled.
74-
default_auto_upgrade = var.regional || var.release_channel != null ? true : false
73+
// When a release channel is used, node auto-upgrade is enabled and cannot be disabled.
74+
default_auto_upgrade = var.regional || var.release_channel != "UNSPECIFIED" ? true : false
7575

7676
cluster_subnet_cidr = var.add_cluster_firewall_rules ? data.google_compute_subnetwork.gke_subnetwork[0].ip_cidr_range : null
7777
cluster_alias_ranges_cidr = var.add_cluster_firewall_rules ? { for range in toset(data.google_compute_subnetwork.gke_subnetwork[0].secondary_ip_range) : range.range_name => range.ip_cidr_range } : {}

Diff for: modules/beta-public-cluster-update-variant/variables.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ variable "identity_namespace" {
407407

408408
variable "release_channel" {
409409
type = string
410-
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`."
411-
default = null
410+
description = "The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`."
411+
default = "REGULAR"
412412
}
413413

414414
variable "gateway_api_channel" {

Diff for: modules/beta-public-cluster/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Then perform the following commands on the root folder:
217217
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
218218
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
219219
| registry\_project\_ids | Projects holding Google Container Registries. If empty, we use the cluster project. If a service account is created and the `grant_registry_access` variable is set to `true`, the `storage.objectViewer` and `artifactregsitry.reader` roles are assigned on these projects. | `list(string)` | `[]` | no |
220-
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `UNSPECIFIED`. | `string` | `null` | no |
220+
| release\_channel | The release channel of this cluster. Accepted values are `UNSPECIFIED`, `RAPID`, `REGULAR` and `STABLE`. Defaults to `REGULAR`. | `string` | `"REGULAR"` | no |
221221
| remove\_default\_node\_pool | Remove default node pool while setting up the cluster | `bool` | `false` | no |
222222
| resource\_usage\_export\_dataset\_id | The ID of a BigQuery Dataset for using BigQuery as the destination of resource usage export. | `string` | `""` | no |
223223
| sandbox\_enabled | (Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it). | `bool` | `false` | no |

0 commit comments

Comments
 (0)