Skip to content

Commit 912da8c

Browse files
authored
feat!: support for gateway api for safer cluster variants (terraform-google-modules#1523)
1 parent 966135f commit 912da8c

File tree

8 files changed

+26
-3
lines changed

8 files changed

+26
-3
lines changed

autogen/safer-cluster/main.tf.tmpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ module "gke" {
4141
// the master upgrades.
4242
//
4343
// https://cloud.google.com/kubernetes-engine/versioning-and-upgrades
44-
release_channel = var.release_channel
44+
release_channel = var.release_channel
45+
gateway_api_channel = var.gateway_api_channel
4546

4647
master_authorized_networks = var.master_authorized_networks
4748

autogen/safer-cluster/variables.tf.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ variable "release_channel" {
7777
default = "REGULAR"
7878
}
7979

80+
variable "gateway_api_channel" {
81+
type = string
82+
description = "The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`."
83+
default = null
84+
}
85+
8086
variable "master_authorized_networks" {
8187
type = list(object({ cidr_block = string, display_name = string }))
8288
description = "List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists)."

modules/safer-cluster-update-variant/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ For simplicity, we suggest using `roles/container.admin` and
228228
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
229229
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
230230
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
231+
| gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no |
231232
| gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `true` | no |
232233
| gke\_backup\_agent\_config | (Beta) Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no |
233234
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | `bool` | `true` | no |

modules/safer-cluster-update-variant/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ module "gke" {
3737
// the master upgrades.
3838
//
3939
// https://cloud.google.com/kubernetes-engine/versioning-and-upgrades
40-
release_channel = var.release_channel
40+
release_channel = var.release_channel
41+
gateway_api_channel = var.gateway_api_channel
4142

4243
master_authorized_networks = var.master_authorized_networks
4344

modules/safer-cluster-update-variant/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ variable "release_channel" {
7777
default = "REGULAR"
7878
}
7979

80+
variable "gateway_api_channel" {
81+
type = string
82+
description = "The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`."
83+
default = null
84+
}
85+
8086
variable "master_authorized_networks" {
8187
type = list(object({ cidr_block = string, display_name = string }))
8288
description = "List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists)."

modules/safer-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ For simplicity, we suggest using `roles/container.admin` and
228228
| filestore\_csi\_driver | The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes | `bool` | `false` | no |
229229
| firewall\_inbound\_ports | List of TCP ports for admission/webhook controllers | `list(string)` | <pre>[<br> "8443",<br> "9443",<br> "15017"<br>]</pre> | no |
230230
| firewall\_priority | Priority rule for firewall rules | `number` | `1000` | no |
231+
| gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no |
231232
| gce\_pd\_csi\_driver | (Beta) Whether this cluster should enable the Google Compute Engine Persistent Disk Container Storage Interface (CSI) Driver. | `bool` | `true` | no |
232233
| gke\_backup\_agent\_config | (Beta) Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no |
233234
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer role. | `bool` | `true` | no |

modules/safer-cluster/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ module "gke" {
3737
// the master upgrades.
3838
//
3939
// https://cloud.google.com/kubernetes-engine/versioning-and-upgrades
40-
release_channel = var.release_channel
40+
release_channel = var.release_channel
41+
gateway_api_channel = var.gateway_api_channel
4142

4243
master_authorized_networks = var.master_authorized_networks
4344

modules/safer-cluster/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ variable "release_channel" {
7777
default = "REGULAR"
7878
}
7979

80+
variable "gateway_api_channel" {
81+
type = string
82+
description = "The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`."
83+
default = null
84+
}
85+
8086
variable "master_authorized_networks" {
8187
type = list(object({ cidr_block = string, display_name = string }))
8288
description = "List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists)."

0 commit comments

Comments
 (0)