Skip to content

Commit 478f8f4

Browse files
authored
Merge branch 'main' into add-auto-monitoring-config
2 parents 3371847 + 0848345 commit 478f8f4

File tree

96 files changed

+1166
-187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1166
-187
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
Extending the adopted spec, each change should have a link to its corresponding pull request appended.
88

9+
## [38.1.0](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/compare/v38.0.1...v38.1.0) (2025-08-29)
10+
11+
12+
### Features
13+
14+
* **deps:** Update Terraform Google Provider to v7 (major) ([#2425](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2425)) ([6967a8f](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/commit/6967a8f2658073959a866b4b638c4e950802eb04))
15+
16+
17+
### Bug Fixes
18+
19+
* note org support of Identity Service for GKE ([#2422](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2422)) ([893ba59](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/commit/893ba597d38bef0bc6a47a5d2a37c802f7ce749d))
20+
921
## [38.0.1](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/compare/v38.0.0...v38.0.1) (2025-08-22)
1022

1123

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,13 @@ docker_test_lint:
7676
/usr/local/bin/test_lint.sh
7777

7878
# Generate documentation
79-
# Removed `display` for https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/issues/3140
8079
.PHONY: docker_generate_docs
8180
docker_generate_docs:
8281
$(DOCKER_BIN) run --rm -it \
8382
-e ENABLE_BPMETADATA=1 \
8483
-v "$(CURDIR)":/workspace \
8584
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \
86-
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_docs --per-module-requirements'
85+
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && generate_docs -d --per-module-requirements'
8786

8887
# Generate files from autogen
8988
.PHONY: docker_generate_modules

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,12 @@ Then perform the following commands on the root folder:
173173
| enable\_default\_node\_pools\_metadata | Whether to enable the default node pools metadata key-value pairs such as `cluster_name` and `node_pool` | `bool` | `true` | no |
174174
| enable\_fqdn\_network\_policy | Enable FQDN Network Policies on the cluster | `bool` | `null` | no |
175175
| enable\_gcfs | Enable image streaming on cluster level. | `bool` | `false` | no |
176-
| enable\_identity\_service | (Optional) Enable the Identity Service component, which allows customers to use external identity providers with the K8S API. | `bool` | `false` | no |
176+
| enable\_identity\_service | (Optional) Enable the Identity Service component, which allows customers to use external identity providers with the K8S API. NOTE: Starting on July 1, 2025, new Google Cloud organizations that you create won't support Identity Service for GKE. | `bool` | `false` | no |
177177
| enable\_intranode\_visibility | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network | `bool` | `false` | no |
178+
| enable\_k8s\_beta\_apis | (Optional) - List of Kubernetes Beta APIs to enable in cluster. | `list(string)` | `[]` | no |
178179
| enable\_kubernetes\_alpha | Whether to enable Kubernetes Alpha features for this cluster. Note that when this option is enabled, the cluster cannot be upgraded and will be automatically deleted after 30 days. | `bool` | `false` | no |
179180
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
181+
| enable\_legacy\_lustre\_port | Set it to true for GKE cluster runs a version earlier than 1.33.2-gke.4780000. Allows the Lustre CSI driver to initialize LNet (the virtual network layer for Lustre kernel module) using port 6988. This flag is required to workaround a port conflict with the gke-metadata-server on GKE nodes | `bool` | `false` | no |
180182
| enable\_mesh\_certificates | Controls the issuance of workload mTLS certificates. When enabled the GKE Workload Identity Certificates controller and node agent will be deployed in the cluster. Requires Workload Identity. | `bool` | `false` | no |
181183
| enable\_multi\_networking | Whether multi-networking is enabled for this cluster | `bool` | `null` | no |
182184
| enable\_network\_egress\_export | Whether to enable network egress metering for this cluster. If enabled, a daemonset will be created in the cluster to meter network egress traffic. | `bool` | `false` | no |
@@ -214,6 +216,7 @@ Then perform the following commands on the root folder:
214216
| logging\_enabled\_components | List of services to monitor: SYSTEM\_COMPONENTS, APISERVER, CONTROLLER\_MANAGER, KCP\_CONNECTION, KCP\_SSHD, KCP\_HPA, SCHEDULER, and WORKLOADS. Empty list is default GKE configuration. | `list(string)` | `[]` | no |
215217
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | `string` | `"logging.googleapis.com/kubernetes"` | no |
216218
| logging\_variant | (Optional) The type of logging agent that is deployed by default for newly created node pools in the cluster. Valid values include DEFAULT and MAX\_THROUGHPUT. | `string` | `null` | no |
219+
| lustre\_csi\_driver | The status of the Lustre CSI driver addon, which allows the usage of a Lustre instances as volumes | `bool` | `null` | no |
217220
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
218221
| maintenance\_exclusions | List of maintenance exclusions. A cluster can have up to three | `list(object({ name = string, start_time = string, end_time = string, exclusion_scope = string }))` | `[]` | no |
219222
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
@@ -251,6 +254,7 @@ Then perform the following commands on the root folder:
251254
| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `null` | no |
252255
| project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes |
253256
| ray\_operator\_config | The Ray Operator Addon configuration for this cluster. | <pre>object({<br> enabled = bool<br> logging_enabled = optional(bool, false)<br> monitoring_enabled = optional(bool, false)<br> })</pre> | <pre>{<br> "enabled": false,<br> "logging_enabled": false,<br> "monitoring_enabled": false<br>}</pre> | no |
257+
| rbac\_binding\_config | RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created. | <pre>object({<br> enable_insecure_binding_system_unauthenticated = optional(bool, null)<br> enable_insecure_binding_system_authenticated = optional(bool, null)<br> })</pre> | <pre>{<br> "enable_insecure_binding_system_authenticated": null,<br> "enable_insecure_binding_system_unauthenticated": null<br>}</pre> | no |
254258
| region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no |
255259
| regional | Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!) | `bool` | `true` | no |
256260
| 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 |
@@ -435,7 +439,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
435439
#### Terraform and Plugins
436440

437441
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
438-
- [Terraform Provider for GCP][terraform-provider-google] v6.41+
442+
- [Terraform Provider for GCP][terraform-provider-google] v6.47+
439443

440444
#### gcloud
441445

autogen/main/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
319319

320320
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
321321
{% if beta_cluster %}
322-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.41+
322+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.47+
323323
{% else %}
324-
- [Terraform Provider for GCP][terraform-provider-google] v6.41+
324+
- [Terraform Provider for GCP][terraform-provider-google] v6.47+
325325
{% endif %}
326326

327327
#### gcloud

autogen/main/cluster.tf.tmpl

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ resource "google_container_cluster" "primary" {
3737
network = "projects/${local.network_project_id}/global/networks/${var.network}"
3838
deletion_protection = var.deletion_protection
3939

40+
dynamic "enable_k8s_beta_apis" {
41+
for_each = length(var.enable_k8s_beta_apis) > 0 ? [1] : []
42+
content {
43+
enabled_apis = var.enable_k8s_beta_apis
44+
}
45+
}
46+
4047
{% if autopilot_cluster != true %}
4148
dynamic "network_policy" {
4249
for_each = local.cluster_network_policy
@@ -280,6 +287,14 @@ resource "google_container_cluster" "primary" {
280287
}
281288
}
282289

290+
dynamic "rbac_binding_config" {
291+
for_each = var.rbac_binding_config.enable_insecure_binding_system_unauthenticated != null || var.rbac_binding_config.enable_insecure_binding_system_authenticated != null ? [var.rbac_binding_config] : []
292+
content {
293+
enable_insecure_binding_system_unauthenticated = rbac_binding_config.value["enable_insecure_binding_system_unauthenticated"]
294+
enable_insecure_binding_system_authenticated = rbac_binding_config.value["enable_insecure_binding_system_authenticated"]
295+
}
296+
}
297+
283298
dynamic "secret_manager_config" {
284299
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
285300
content {
@@ -347,10 +362,20 @@ resource "google_container_cluster" "primary" {
347362

348363
{% if autopilot_cluster != true %}
349364
dynamic "node_pool_auto_config" {
350-
for_each = var.cluster_autoscaling.enabled && (length(var.network_tags) > 0 || var.add_cluster_firewall_rules) ? [1] : []
365+
for_each = var.cluster_autoscaling.enabled && (length(var.network_tags) > 0 || var.add_cluster_firewall_rules || local.node_pools_cgroup_mode != null) ? [1] : []
351366
content {
352-
network_tags {
353-
tags = var.add_cluster_firewall_rules ? (concat(var.network_tags, [local.cluster_network_tag])) : var.network_tags
367+
dynamic "network_tags" {
368+
for_each = var.cluster_autoscaling.enabled && (length(var.network_tags) > 0 || var.add_cluster_firewall_rules) ? [1] : []
369+
content {
370+
tags = var.add_cluster_firewall_rules ? (concat(var.network_tags, [local.cluster_network_tag])) : var.network_tags
371+
}
372+
}
373+
374+
dynamic "linux_node_config" {
375+
for_each = local.node_pools_cgroup_mode["all"] != "" ? [1] : []
376+
content {
377+
cgroup_mode = local.node_pools_cgroup_mode["all"]
378+
}
354379
}
355380
}
356381
}
@@ -382,6 +407,14 @@ resource "google_container_cluster" "primary" {
382407
enabled = var.filestore_csi_driver
383408
}
384409

410+
dynamic "lustre_csi_driver_config" {
411+
for_each = var.lustre_csi_driver == null ? [] : ["lustre_csi_driver_config"]
412+
content {
413+
enabled = var.lustre_csi_driver
414+
enable_legacy_lustre_port = var.enable_legacy_lustre_port
415+
}
416+
}
417+
385418
{% if autopilot_cluster != true %}
386419
network_policy_config {
387420
disabled = !var.network_policy

autogen/main/variables.tf.tmpl

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2022 Google LLC
2+
* Copyright 2022-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -399,6 +399,12 @@ variable "network_tags" {
399399
default = []
400400
}
401401

402+
variable "enable_k8s_beta_apis" {
403+
description = "(Optional) - List of Kubernetes Beta APIs to enable in cluster."
404+
type = list(string)
405+
default = []
406+
}
407+
402408
{% if autopilot_cluster != true %}
403409
variable "stub_domains" {
404410
type = map(list(string))
@@ -772,6 +778,18 @@ variable "filestore_csi_driver" {
772778
default = false
773779
}
774780

781+
variable "lustre_csi_driver" {
782+
type = bool
783+
description = "The status of the Lustre CSI driver addon, which allows the usage of a Lustre instances as volumes"
784+
default = null
785+
}
786+
787+
variable "enable_legacy_lustre_port" {
788+
type = bool
789+
description = "Set it to true for GKE cluster runs a version earlier than 1.33.2-gke.4780000. Allows the Lustre CSI driver to initialize LNet (the virtual network layer for Lustre kernel module) using port 6988. This flag is required to workaround a port conflict with the gke-metadata-server on GKE nodes"
790+
default = false
791+
}
792+
775793
{% if autopilot_cluster != true %}
776794
variable "network_policy" {
777795
type = bool
@@ -1101,7 +1119,7 @@ variable "sandbox_enabled" {
11011119
{% if autopilot_cluster != true %}
11021120
variable "enable_identity_service" {
11031121
type = bool
1104-
description = "(Optional) Enable the Identity Service component, which allows customers to use external identity providers with the K8S API."
1122+
description = "(Optional) Enable the Identity Service component, which allows customers to use external identity providers with the K8S API. NOTE: Starting on July 1, 2025, new Google Cloud organizations that you create won't support Identity Service for GKE."
11051123
default = false
11061124
}
11071125
{% endif %}
@@ -1166,3 +1184,15 @@ variable "ip_endpoints_enabled" {
11661184
type = bool
11671185
default = null
11681186
}
1187+
1188+
variable "rbac_binding_config" {
1189+
type = object({
1190+
enable_insecure_binding_system_unauthenticated = optional(bool, null)
1191+
enable_insecure_binding_system_authenticated = optional(bool, null)
1192+
})
1193+
description = "RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings that can be created."
1194+
default = {
1195+
enable_insecure_binding_system_unauthenticated = null
1196+
enable_insecure_binding_system_authenticated = null
1197+
}
1198+
}

autogen/main/versions.tf.tmpl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,33 @@ terraform {
2424
required_providers {
2525
google = {
2626
source = "hashicorp/google"
27-
version = ">= 6.42.0, < 7"
27+
version = ">= 6.47.0, < 8"
2828
}
2929
google-beta = {
3030
source = "hashicorp/google-beta"
31-
version = ">= 6.42.0, < 7"
31+
version = ">= 6.47.0, < 8"
3232
}
3333
{% elif beta_cluster and autopilot_cluster %}
3434
required_providers {
3535
google = {
3636
source = "hashicorp/google"
37-
version = ">= 6.42.0, < 7"
37+
version = ">= 6.47.0, < 8"
3838
}
3939
google-beta = {
4040
source = "hashicorp/google-beta"
41-
version = ">= 6.42.0, < 7"
41+
version = ">= 6.47.0, < 8"
4242
}
4343
{% elif autopilot_cluster %}
4444
required_providers {
4545
google = {
4646
source = "hashicorp/google"
47-
version = ">= 6.42.0, < 7"
47+
version = ">= 6.47.0, < 8"
4848
}
4949
{% else %}
5050
required_providers {
5151
google = {
5252
source = "hashicorp/google"
53-
version = ">= 6.42.0, < 7"
53+
version = ">= 6.47.0, < 8"
5454
}
5555
{% endif %}
5656
kubernetes = {
@@ -63,6 +63,6 @@ terraform {
6363
}
6464
}
6565
provider_meta "{% if beta_cluster %}google-beta{% else %}google{% endif %}" {
66-
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v38.0.1"
66+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v38.1.0"
6767
}
6868
}

autogen/safer-cluster/versions.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ terraform {
2323
required_version = ">=1.3"
2424

2525
provider_meta "google-beta" {
26-
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v38.0.1"
26+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v38.1.0"
2727
}
2828
}

cluster.tf

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ resource "google_container_cluster" "primary" {
3333
network = "projects/${local.network_project_id}/global/networks/${var.network}"
3434
deletion_protection = var.deletion_protection
3535

36+
dynamic "enable_k8s_beta_apis" {
37+
for_each = length(var.enable_k8s_beta_apis) > 0 ? [1] : []
38+
content {
39+
enabled_apis = var.enable_k8s_beta_apis
40+
}
41+
}
42+
3643
dynamic "network_policy" {
3744
for_each = local.cluster_network_policy
3845

@@ -219,6 +226,14 @@ resource "google_container_cluster" "primary" {
219226
}
220227
}
221228

229+
dynamic "rbac_binding_config" {
230+
for_each = var.rbac_binding_config.enable_insecure_binding_system_unauthenticated != null || var.rbac_binding_config.enable_insecure_binding_system_authenticated != null ? [var.rbac_binding_config] : []
231+
content {
232+
enable_insecure_binding_system_unauthenticated = rbac_binding_config.value["enable_insecure_binding_system_unauthenticated"]
233+
enable_insecure_binding_system_authenticated = rbac_binding_config.value["enable_insecure_binding_system_authenticated"]
234+
}
235+
}
236+
222237
dynamic "secret_manager_config" {
223238
for_each = var.enable_secret_manager_addon ? [var.enable_secret_manager_addon] : []
224239
content {
@@ -256,10 +271,20 @@ resource "google_container_cluster" "primary" {
256271
}
257272

258273
dynamic "node_pool_auto_config" {
259-
for_each = var.cluster_autoscaling.enabled && (length(var.network_tags) > 0 || var.add_cluster_firewall_rules) ? [1] : []
274+
for_each = var.cluster_autoscaling.enabled && (length(var.network_tags) > 0 || var.add_cluster_firewall_rules || local.node_pools_cgroup_mode != null) ? [1] : []
260275
content {
261-
network_tags {
262-
tags = var.add_cluster_firewall_rules ? (concat(var.network_tags, [local.cluster_network_tag])) : var.network_tags
276+
dynamic "network_tags" {
277+
for_each = var.cluster_autoscaling.enabled && (length(var.network_tags) > 0 || var.add_cluster_firewall_rules) ? [1] : []
278+
content {
279+
tags = var.add_cluster_firewall_rules ? (concat(var.network_tags, [local.cluster_network_tag])) : var.network_tags
280+
}
281+
}
282+
283+
dynamic "linux_node_config" {
284+
for_each = local.node_pools_cgroup_mode["all"] != "" ? [1] : []
285+
content {
286+
cgroup_mode = local.node_pools_cgroup_mode["all"]
287+
}
263288
}
264289
}
265290
}
@@ -290,6 +315,14 @@ resource "google_container_cluster" "primary" {
290315
enabled = var.filestore_csi_driver
291316
}
292317

318+
dynamic "lustre_csi_driver_config" {
319+
for_each = var.lustre_csi_driver == null ? [] : ["lustre_csi_driver_config"]
320+
content {
321+
enabled = var.lustre_csi_driver
322+
enable_legacy_lustre_port = var.enable_legacy_lustre_port
323+
}
324+
}
325+
293326
network_policy_config {
294327
disabled = !var.network_policy
295328
}

docs/upgrading_to_v39.0.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Upgrading to v39.0
2+
The v39.0 release of *kubernetes-engine* is a backwards incompatible release.
3+
4+
### Google Cloud Platform Provider upgrade
5+
The Terraform Kubernetes Engine Module now requires version 6.47 or higher of the Google Cloud Platform Providers.

0 commit comments

Comments
 (0)