Skip to content

Commit d4be7cc

Browse files
authored
Merge branch 'main' into main
2 parents cd5bd14 + 30c08c5 commit d4be7cc

File tree

107 files changed

+1963
-313
lines changed

Some content is hidden

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

107 files changed

+1963
-313
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ 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+
## [39.0.0](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/compare/v38.1.0...v39.0.0) (2025-09-15)
10+
11+
12+
### ⚠ BREAKING CHANGES
13+
14+
* **TPG >= 6.47:** add support for lustre csi driver ([#2433](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2433))
15+
* **TPG>=6.47:** add support for rbac_binding_config ([#2401](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2401))
16+
17+
### Features
18+
19+
* add enable_k8s_beta_apis support ([#2387](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2387)) ([090781d](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/commit/090781d4edc596cafe8a4241ea3d068e851ff0c6))
20+
* add support for additional_pod_ranges_config ([#2435](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2435)) ([8b6a803](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/commit/8b6a803b7c56574a13797aff892357326e9df0ad))
21+
* **TPG >= 6.47:** add support for lustre csi driver ([#2433](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2433)) ([b56546d](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/commit/b56546d24fb83a0d34952f9b5d0fd97893fd4f8b))
22+
* **TPG>=6.47:** add support for rbac_binding_config ([#2401](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2401)) ([2c8b78d](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/commit/2c8b78dd0acfa050fd7fdb020fce4ddc4b451c32))
23+
24+
25+
### Bug Fixes
26+
27+
* Add the nodepool cgroup mode to the NAP config ([#2356](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2356)) ([eeaf95d](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/commit/eeaf95d511a9cf500e45c1cd9c34d0e13482b0f3))
28+
* Avoid flapping network_tags when insecure_kubelet_readonly_port_enabled is non-null ([#2439](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2439)) ([0ffe3f9](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/commit/0ffe3f9929f28e4d4b449fc32e67a5c30e0e12c0))
29+
* Make GKE components ADC compatible ([#2440](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2440)) ([74d37d8](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/commit/74d37d8b2d489150acc839991719e0fb70f2ecdb))
30+
* typo in taint dynamic block in main.tf for gke-node-pools module ([#2424](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/2424)) ([0848345](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/commit/0848345a65b7f5192385d79410c4a98203045f70))
31+
932
## [38.1.0](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/compare/v38.0.1...v38.1.0) (2025-08-29)
1033

1134

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ Then perform the following commands on the root folder:
144144
| add\_master\_webhook\_firewall\_rules | Create master\_webhook firewall rules for ports defined in `firewall_inbound_ports` | `bool` | `false` | no |
145145
| add\_shadow\_firewall\_rules | Create GKE shadow firewall (the same as default firewall rules with firewall logs enabled). | `bool` | `false` | no |
146146
| additional\_ip\_range\_pods | List of _names_ of the additional secondary subnet ip ranges to use for pods | `list(string)` | `[]` | no |
147+
| additional\_pod\_ranges\_config | the configuration for individual additional subnetworks attached to the cluster | `list(object({ subnetwork = string, pod_ipv4_range_names = list(string) }))` | `[]` | no |
147148
| additive\_vpc\_scope\_dns\_domain | This will enable Cloud DNS additive VPC scope. Must provide a domain name that is unique within the VPC. For this to work cluster\_dns = `CLOUD_DNS` and cluster\_dns\_scope = `CLUSTER_SCOPE` must both be set as well. | `string` | `""` | no |
148149
| authenticator\_security\_group | The name of the RBAC security group for use with Google security groups in Kubernetes RBAC. Group name must be in format [email protected] | `string` | `null` | no |
149150
| boot\_disk\_kms\_key | The Customer Managed Encryption Key used to encrypt the boot disk attached to each node in the node pool, if not overridden in `node_pools`. This should be of the form projects/[KEY\_PROJECT\_ID]/locations/[LOCATION]/keyRings/[RING\_NAME]/cryptoKeys/[KEY\_NAME]. For more information about protecting resources with Cloud KMS Keys please see: https://cloud.google.com/compute/docs/disks/customer-managed-encryption | `string` | `null` | no |
@@ -179,6 +180,7 @@ Then perform the following commands on the root folder:
179180
| enable\_k8s\_beta\_apis | (Optional) - List of Kubernetes Beta APIs to enable in cluster. | `list(string)` | `[]` | no |
180181
| 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 |
181182
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
183+
| 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 |
182184
| 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 |
183185
| enable\_multi\_networking | Whether multi-networking is enabled for this cluster | `bool` | `null` | no |
184186
| 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 |
@@ -216,6 +218,7 @@ Then perform the following commands on the root folder:
216218
| 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 |
217219
| 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 |
218220
| 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 |
221+
| lustre\_csi\_driver | The status of the Lustre CSI driver addon, which allows the usage of a Lustre instances as volumes | `bool` | `null` | no |
219222
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
220223
| 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 |
221224
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
@@ -437,7 +440,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
437440
#### Terraform and Plugins
438441

439442
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
440-
- [Terraform Provider for GCP][terraform-provider-google] v6.41+
443+
- [Terraform Provider for GCP][terraform-provider-google] v6.47+
441444

442445
#### gcloud
443446

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: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ resource "google_container_cluster" "primary" {
334334
for_each = length(var.network_tags) > 0 || var.add_cluster_firewall_rules || var.add_master_webhook_firewall_rules || var.add_shadow_firewall_rules || var.insecure_kubelet_readonly_port_enabled != null || var.node_pools_cgroup_mode != null ? [1] : []
335335
content {
336336
dynamic "network_tags" {
337-
for_each = length(var.network_tags) > 0 || var.add_cluster_firewall_rules || var.add_master_webhook_firewall_rules || var.add_shadow_firewall_rules || var.insecure_kubelet_readonly_port_enabled != null ? [1] : []
337+
for_each = length(var.network_tags) > 0 || var.add_cluster_firewall_rules || var.add_master_webhook_firewall_rules || var.add_shadow_firewall_rules ? [1] : []
338338
content {
339339
tags = var.add_cluster_firewall_rules || var.add_master_webhook_firewall_rules || var.add_shadow_firewall_rules ? concat(var.network_tags, [local.cluster_network_tag]) : length(var.network_tags) > 0 ? var.network_tags : null
340340
}
@@ -403,6 +403,14 @@ resource "google_container_cluster" "primary" {
403403
enabled = var.filestore_csi_driver
404404
}
405405

406+
dynamic "lustre_csi_driver_config" {
407+
for_each = var.lustre_csi_driver == null ? [] : ["lustre_csi_driver_config"]
408+
content {
409+
enabled = var.lustre_csi_driver
410+
enable_legacy_lustre_port = var.enable_legacy_lustre_port
411+
}
412+
}
413+
406414
{% if autopilot_cluster != true %}
407415
network_policy_config {
408416
disabled = !var.network_policy
@@ -535,6 +543,13 @@ resource "google_container_cluster" "primary" {
535543
pod_range_names = var.additional_ip_range_pods
536544
}
537545
}
546+
dynamic "additional_pod_ranges_config" {
547+
for_each = var.additional_pod_ranges_config
548+
content {
549+
subnetwork = var.additional_pod_ranges_config.subnetwork
550+
pod_ipv4_range_names = var.additional_pod_ranges_config.pod_ipv4_range_names
551+
}
552+
}
538553
stack_type = var.stack_type
539554
}
540555

autogen/main/variables.tf.tmpl

Lines changed: 19 additions & 1 deletion
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.
@@ -174,6 +174,12 @@ variable "additional_ip_range_pods" {
174174
default = []
175175
}
176176

177+
variable "additional_pod_ranges_config" {
178+
type = list(object({ subnetwork = string, pod_ipv4_range_names = list(string) }))
179+
description = "the configuration for individual additional subnetworks attached to the cluster"
180+
default = []
181+
}
182+
177183
variable "ip_range_services" {
178184
type = string
179185
description = "The _name_ of the secondary subnet range to use for services. If not provided, the default `34.118.224.0/20` range will be used."
@@ -778,6 +784,18 @@ variable "filestore_csi_driver" {
778784
default = false
779785
}
780786

787+
variable "lustre_csi_driver" {
788+
type = bool
789+
description = "The status of the Lustre CSI driver addon, which allows the usage of a Lustre instances as volumes"
790+
default = null
791+
}
792+
793+
variable "enable_legacy_lustre_port" {
794+
type = bool
795+
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"
796+
default = false
797+
}
798+
781799
{% if autopilot_cluster != true %}
782800
variable "network_policy" {
783801
type = bool

autogen/main/versions.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.1.0"
66+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v39.0.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.1.0"
26+
module_name = "blueprints/terraform/terraform-google-kubernetes-engine{% if module_registry_name %}:{{ module_registry_name }}{% endif %}/v39.0.0"
2727
}
2828
}

cluster.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,14 @@ resource "google_container_cluster" "primary" {
310310
enabled = var.filestore_csi_driver
311311
}
312312

313+
dynamic "lustre_csi_driver_config" {
314+
for_each = var.lustre_csi_driver == null ? [] : ["lustre_csi_driver_config"]
315+
content {
316+
enabled = var.lustre_csi_driver
317+
enable_legacy_lustre_port = var.enable_legacy_lustre_port
318+
}
319+
}
320+
313321
network_policy_config {
314322
disabled = !var.network_policy
315323
}
@@ -404,6 +412,13 @@ resource "google_container_cluster" "primary" {
404412
pod_range_names = var.additional_ip_range_pods
405413
}
406414
}
415+
dynamic "additional_pod_ranges_config" {
416+
for_each = var.additional_pod_ranges_config
417+
content {
418+
subnetwork = var.additional_pod_ranges_config.subnetwork
419+
pod_ipv4_range_names = var.additional_pod_ranges_config.pod_ipv4_range_names
420+
}
421+
}
407422
stack_type = var.stack_type
408423
}
409424

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.

examples/confidential_autopilot_private/network.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
module "gcp-network" {
1818
source = "terraform-google-modules/network/google"
19-
version = "~> 11.0"
19+
version = "~> 12.0"
2020

2121
project_id = var.project_id
2222
network_name = local.network_name

0 commit comments

Comments
 (0)