Skip to content

Commit b56546d

Browse files
imrannayerapeabody
andauthored
feat(TPG >= 6.47)!: add support for lustre csi driver (#2433)
Co-authored-by: Andrew Peabody <[email protected]>
1 parent eeaf95d commit b56546d

Some content is hidden

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

52 files changed

+398
-23
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ Then perform the following commands on the root folder:
178178
| enable\_k8s\_beta\_apis | (Optional) - List of Kubernetes Beta APIs to enable in cluster. | `list(string)` | `[]` | no |
179179
| 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 |
180180
| 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 |
181182
| 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 |
182183
| enable\_multi\_networking | Whether multi-networking is enabled for this cluster | `bool` | `null` | no |
183184
| 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 |
@@ -215,6 +216,7 @@ Then perform the following commands on the root folder:
215216
| 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 |
216217
| 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 |
217218
| 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 |
218220
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
219221
| 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 |
220222
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
@@ -436,7 +438,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
436438
#### Terraform and Plugins
437439

438440
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
439-
- [Terraform Provider for GCP][terraform-provider-google] v6.41+
441+
- [Terraform Provider for GCP][terraform-provider-google] v6.47+
440442

441443
#### gcloud
442444

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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,14 @@ resource "google_container_cluster" "primary" {
401401
enabled = var.filestore_csi_driver
402402
}
403403

404+
dynamic "lustre_csi_driver_config" {
405+
for_each = var.lustre_csi_driver == null ? [] : ["lustre_csi_driver_config"]
406+
content {
407+
enabled = var.lustre_csi_driver
408+
enable_legacy_lustre_port = var.enable_legacy_lustre_port
409+
}
410+
}
411+
404412
{% if autopilot_cluster != true %}
405413
network_policy_config {
406414
disabled = !var.network_policy

autogen/main/variables.tf.tmpl

Lines changed: 13 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.
@@ -778,6 +778,18 @@ variable "filestore_csi_driver" {
778778
default = false
779779
}
780780

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+
781793
{% if autopilot_cluster != true %}
782794
variable "network_policy" {
783795
type = bool

cluster.tf

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

312+
dynamic "lustre_csi_driver_config" {
313+
for_each = var.lustre_csi_driver == null ? [] : ["lustre_csi_driver_config"]
314+
content {
315+
enabled = var.lustre_csi_driver
316+
enable_legacy_lustre_port = var.enable_legacy_lustre_port
317+
}
318+
}
319+
312320
network_policy_config {
313321
disabled = !var.network_policy
314322
}

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.

metadata.display.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ spec:
141141
enable_l4_ilb_subsetting:
142142
name: enable_l4_ilb_subsetting
143143
title: Enable L4 Ilb Subsetting
144+
enable_legacy_lustre_port:
145+
name: enable_legacy_lustre_port
146+
title: Enable Legacy Lustre Port
144147
enable_mesh_certificates:
145148
name: enable_mesh_certificates
146149
title: Enable Mesh Certificates
@@ -252,6 +255,9 @@ spec:
252255
logging_variant:
253256
name: logging_variant
254257
title: Logging Variant
258+
lustre_csi_driver:
259+
name: lustre_csi_driver
260+
title: Lustre Csi Driver
255261
maintenance_end_time:
256262
name: maintenance_end_time
257263
title: Maintenance End Time
@@ -360,6 +366,9 @@ spec:
360366
ray_operator_config:
361367
name: ray_operator_config
362368
title: Ray Operator Config
369+
rbac_binding_config:
370+
name: rbac_binding_config
371+
title: Rbac Binding Config
363372
region:
364373
name: region
365374
title: Region

metadata.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,13 @@ spec:
601601
description: The status of the Filestore CSI driver addon, which allows the usage of filestore instance as volumes
602602
varType: bool
603603
defaultValue: false
604+
- name: lustre_csi_driver
605+
description: The status of the Lustre CSI driver addon, which allows the usage of a Lustre instances as volumes
606+
varType: bool
607+
- name: enable_legacy_lustre_port
608+
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
609+
varType: bool
610+
defaultValue: false
604611
- name: network_policy
605612
description: Enable network policy addon
606613
varType: bool

modules/beta-autopilot-private-cluster/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ Then perform the following commands on the root folder:
9898
| enable\_fqdn\_network\_policy | Enable FQDN Network Policies on the cluster | `bool` | `null` | no |
9999
| enable\_k8s\_beta\_apis | (Optional) - List of Kubernetes Beta APIs to enable in cluster. | `list(string)` | `[]` | no |
100100
| enable\_l4\_ilb\_subsetting | Enable L4 ILB Subsetting on the cluster | `bool` | `false` | no |
101+
| 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 |
101102
| enable\_multi\_networking | Whether multi-networking is enabled for this cluster | `bool` | `null` | no |
102103
| 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 |
103104
| enable\_private\_endpoint | Whether the master's internal IP address is used as the cluster endpoint | `bool` | `false` | no |
@@ -129,6 +130,7 @@ Then perform the following commands on the root folder:
129130
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | `bool` | `false` | no |
130131
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | `string` | `"latest"` | no |
131132
| 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 |
133+
| lustre\_csi\_driver | The status of the Lustre CSI driver addon, which allows the usage of a Lustre instances as volumes | `bool` | `null` | no |
132134
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
133135
| 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 |
134136
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
@@ -230,7 +232,7 @@ The [project factory](https://github.com/terraform-google-modules/terraform-goog
230232
#### Terraform and Plugins
231233

232234
- [Terraform](https://www.terraform.io/downloads.html) 1.3+
233-
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.41+
235+
- [Terraform Provider for GCP Beta][terraform-provider-google-beta] v6.47+
234236

235237
#### gcloud
236238

modules/beta-autopilot-private-cluster/cluster.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,14 @@ resource "google_container_cluster" "primary" {
236236
enabled = var.filestore_csi_driver
237237
}
238238

239+
dynamic "lustre_csi_driver_config" {
240+
for_each = var.lustre_csi_driver == null ? [] : ["lustre_csi_driver_config"]
241+
content {
242+
enabled = var.lustre_csi_driver
243+
enable_legacy_lustre_port = var.enable_legacy_lustre_port
244+
}
245+
}
246+
239247

240248
dynamic "gke_backup_agent_config" {
241249
for_each = local.gke_backup_agent_config

0 commit comments

Comments
 (0)