From e791330d31c8fd6505ded079eb851f5f61672ff9 Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Sat, 7 Dec 2024 18:15:33 -0500 Subject: [PATCH 1/3] support parallelstore csi driver Signed-off-by: drfaust92 --- README.md | 1 + autogen/main/cluster.tf.tmpl | 8 ++++++++ autogen/main/main.tf.tmpl | 9 +++++---- autogen/main/variables.tf.tmpl | 6 ++++++ cluster.tf | 8 ++++++++ main.tf | 13 +++++++------ modules/beta-autopilot-private-cluster/README.md | 1 + modules/beta-autopilot-private-cluster/cluster.tf | 8 ++++++++ modules/beta-autopilot-private-cluster/main.tf | 9 +++++---- modules/beta-autopilot-private-cluster/variables.tf | 6 ++++++ modules/beta-autopilot-public-cluster/README.md | 1 + modules/beta-autopilot-public-cluster/cluster.tf | 8 ++++++++ modules/beta-autopilot-public-cluster/main.tf | 9 +++++---- modules/beta-autopilot-public-cluster/variables.tf | 6 ++++++ .../beta-private-cluster-update-variant/README.md | 1 + .../beta-private-cluster-update-variant/cluster.tf | 8 ++++++++ modules/beta-private-cluster-update-variant/main.tf | 13 +++++++------ .../variables.tf | 6 ++++++ modules/beta-private-cluster/README.md | 1 + modules/beta-private-cluster/cluster.tf | 8 ++++++++ modules/beta-private-cluster/main.tf | 13 +++++++------ modules/beta-private-cluster/variables.tf | 6 ++++++ .../beta-public-cluster-update-variant/README.md | 1 + .../beta-public-cluster-update-variant/cluster.tf | 8 ++++++++ modules/beta-public-cluster-update-variant/main.tf | 13 +++++++------ .../beta-public-cluster-update-variant/variables.tf | 6 ++++++ modules/beta-public-cluster/README.md | 1 + modules/beta-public-cluster/cluster.tf | 8 ++++++++ modules/beta-public-cluster/main.tf | 13 +++++++------ modules/beta-public-cluster/variables.tf | 6 ++++++ modules/private-cluster-update-variant/README.md | 1 + modules/private-cluster-update-variant/cluster.tf | 8 ++++++++ modules/private-cluster-update-variant/main.tf | 13 +++++++------ modules/private-cluster-update-variant/variables.tf | 6 ++++++ modules/private-cluster/README.md | 1 + modules/private-cluster/cluster.tf | 8 ++++++++ modules/private-cluster/main.tf | 13 +++++++------ modules/private-cluster/variables.tf | 6 ++++++ variables.tf | 6 ++++++ 39 files changed, 213 insertions(+), 54 deletions(-) diff --git a/README.md b/README.md index ea612e0a92..a27be79044 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | | region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no | diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index b493d04f7c..dbe5bf02b4 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -388,6 +388,14 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { + for_each = local.parallelstore_csi_driver_config + + content { + enabled = parallelstore_csi_driver_config.value.enabled + } + } + {% if beta_cluster and autopilot_cluster != true %} istio_config { disabled = !var.istio diff --git a/autogen/main/main.tf.tmpl b/autogen/main/main.tf.tmpl index cc4a14817b..639c96bc29 100644 --- a/autogen/main/main.tf.tmpl +++ b/autogen/main/main.tf.tmpl @@ -108,10 +108,11 @@ locals { cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null {% endif %} - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false)? [var.ray_operator_config]: [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false)? [var.ray_operator_config]: [] {% if beta_cluster and autopilot_cluster != true %} cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { load_balancer_type = var.cloudrun_load_balancer_type diff --git a/autogen/main/variables.tf.tmpl b/autogen/main/variables.tf.tmpl index 704915adf8..80a849e928 100644 --- a/autogen/main/variables.tf.tmpl +++ b/autogen/main/variables.tf.tmpl @@ -834,6 +834,12 @@ variable "stateful_ha" { default = false } +variable "parallelstore_csi_driver" { + type = bool + description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." + default = false +} + variable "ray_operator_config" { type = object({ enabled = bool diff --git a/cluster.tf b/cluster.tf index d53799e500..91d7bb7300 100644 --- a/cluster.tf +++ b/cluster.tf @@ -308,6 +308,14 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { + for_each = local.parallelstore_csi_driver_config + + content { + enabled = parallelstore_csi_driver_config.value.enabled + } + } + } datapath_provider = var.datapath_provider diff --git a/main.tf b/main.tf index 5a3caac731..081c17ffb0 100644 --- a/main.tf +++ b/main.tf @@ -88,12 +88,13 @@ locals { enabled = false provider = null }] - cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] - logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] + logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ security_group = var.authenticator_security_group diff --git a/modules/beta-autopilot-private-cluster/README.md b/modules/beta-autopilot-private-cluster/README.md index 888c450654..c248576c03 100644 --- a/modules/beta-autopilot-private-cluster/README.md +++ b/modules/beta-autopilot-private-cluster/README.md @@ -137,6 +137,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | diff --git a/modules/beta-autopilot-private-cluster/cluster.tf b/modules/beta-autopilot-private-cluster/cluster.tf index bddef25b74..6ea95d3ccf 100644 --- a/modules/beta-autopilot-private-cluster/cluster.tf +++ b/modules/beta-autopilot-private-cluster/cluster.tf @@ -210,6 +210,14 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { + for_each = local.parallelstore_csi_driver_config + + content { + enabled = parallelstore_csi_driver_config.value.enabled + } + } + } allow_net_admin = var.allow_net_admin diff --git a/modules/beta-autopilot-private-cluster/main.tf b/modules/beta-autopilot-private-cluster/main.tf index e2bd8547a3..d90b187b41 100644 --- a/modules/beta-autopilot-private-cluster/main.tf +++ b/modules/beta-autopilot-private-cluster/main.tf @@ -64,10 +64,11 @@ locals { 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 } : {} pod_all_ip_ranges = var.add_cluster_firewall_rules ? compact(concat([local.cluster_alias_ranges_cidr[var.ip_range_pods]], [for range in var.additional_ip_range_pods : local.cluster_alias_ranges_cidr[range] if length(range) > 0])) : [] - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ security_group = var.authenticator_security_group diff --git a/modules/beta-autopilot-private-cluster/variables.tf b/modules/beta-autopilot-private-cluster/variables.tf index 813d42b716..11a8e51d99 100644 --- a/modules/beta-autopilot-private-cluster/variables.tf +++ b/modules/beta-autopilot-private-cluster/variables.tf @@ -501,6 +501,12 @@ variable "stateful_ha" { default = false } +variable "parallelstore_csi_driver" { + type = bool + description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." + default = false +} + variable "ray_operator_config" { type = object({ enabled = bool diff --git a/modules/beta-autopilot-public-cluster/README.md b/modules/beta-autopilot-public-cluster/README.md index 729039e281..f4049edb22 100644 --- a/modules/beta-autopilot-public-cluster/README.md +++ b/modules/beta-autopilot-public-cluster/README.md @@ -127,6 +127,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | | region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no | diff --git a/modules/beta-autopilot-public-cluster/cluster.tf b/modules/beta-autopilot-public-cluster/cluster.tf index 4baca3ecac..e40bb13ac1 100644 --- a/modules/beta-autopilot-public-cluster/cluster.tf +++ b/modules/beta-autopilot-public-cluster/cluster.tf @@ -210,6 +210,14 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { + for_each = local.parallelstore_csi_driver_config + + content { + enabled = parallelstore_csi_driver_config.value.enabled + } + } + } allow_net_admin = var.allow_net_admin diff --git a/modules/beta-autopilot-public-cluster/main.tf b/modules/beta-autopilot-public-cluster/main.tf index 5f2e7f7421..6aa3079a5c 100644 --- a/modules/beta-autopilot-public-cluster/main.tf +++ b/modules/beta-autopilot-public-cluster/main.tf @@ -64,10 +64,11 @@ locals { 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 } : {} pod_all_ip_ranges = var.add_cluster_firewall_rules ? compact(concat([local.cluster_alias_ranges_cidr[var.ip_range_pods]], [for range in var.additional_ip_range_pods : local.cluster_alias_ranges_cidr[range] if length(range) > 0])) : [] - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ security_group = var.authenticator_security_group diff --git a/modules/beta-autopilot-public-cluster/variables.tf b/modules/beta-autopilot-public-cluster/variables.tf index f212deff44..96756f8b4b 100644 --- a/modules/beta-autopilot-public-cluster/variables.tf +++ b/modules/beta-autopilot-public-cluster/variables.tf @@ -465,6 +465,12 @@ variable "stateful_ha" { default = false } +variable "parallelstore_csi_driver" { + type = bool + description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." + default = false +} + variable "ray_operator_config" { type = object({ enabled = bool diff --git a/modules/beta-private-cluster-update-variant/README.md b/modules/beta-private-cluster-update-variant/README.md index 45d57d1651..3c89f68ef5 100644 --- a/modules/beta-private-cluster-update-variant/README.md +++ b/modules/beta-private-cluster-update-variant/README.md @@ -276,6 +276,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index d4f320e369..5160d50524 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -322,6 +322,14 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { + for_each = local.parallelstore_csi_driver_config + + content { + enabled = parallelstore_csi_driver_config.value.enabled + } + } + istio_config { disabled = !var.istio auth = var.istio_auth diff --git a/modules/beta-private-cluster-update-variant/main.tf b/modules/beta-private-cluster-update-variant/main.tf index c573681b7b..79b5a30c6b 100644 --- a/modules/beta-private-cluster-update-variant/main.tf +++ b/modules/beta-private-cluster-update-variant/main.tf @@ -88,12 +88,13 @@ locals { enabled = false provider = null }] - cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] - logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] + logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { load_balancer_type = var.cloudrun_load_balancer_type } : {} diff --git a/modules/beta-private-cluster-update-variant/variables.tf b/modules/beta-private-cluster-update-variant/variables.tf index 8c2e2de46c..37de471fce 100644 --- a/modules/beta-private-cluster-update-variant/variables.tf +++ b/modules/beta-private-cluster-update-variant/variables.tf @@ -795,6 +795,12 @@ variable "stateful_ha" { default = false } +variable "parallelstore_csi_driver" { + type = bool + description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." + default = false +} + variable "ray_operator_config" { type = object({ enabled = bool diff --git a/modules/beta-private-cluster/README.md b/modules/beta-private-cluster/README.md index 30e38fb25f..ca7ac0463d 100644 --- a/modules/beta-private-cluster/README.md +++ b/modules/beta-private-cluster/README.md @@ -254,6 +254,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index 29f11bb7ee..a4fc72d825 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -322,6 +322,14 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { + for_each = local.parallelstore_csi_driver_config + + content { + enabled = parallelstore_csi_driver_config.value.enabled + } + } + istio_config { disabled = !var.istio auth = var.istio_auth diff --git a/modules/beta-private-cluster/main.tf b/modules/beta-private-cluster/main.tf index c573681b7b..79b5a30c6b 100644 --- a/modules/beta-private-cluster/main.tf +++ b/modules/beta-private-cluster/main.tf @@ -88,12 +88,13 @@ locals { enabled = false provider = null }] - cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] - logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] + logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { load_balancer_type = var.cloudrun_load_balancer_type } : {} diff --git a/modules/beta-private-cluster/variables.tf b/modules/beta-private-cluster/variables.tf index 8c2e2de46c..37de471fce 100644 --- a/modules/beta-private-cluster/variables.tf +++ b/modules/beta-private-cluster/variables.tf @@ -795,6 +795,12 @@ variable "stateful_ha" { default = false } +variable "parallelstore_csi_driver" { + type = bool + description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." + default = false +} + variable "ray_operator_config" { type = object({ enabled = bool diff --git a/modules/beta-public-cluster-update-variant/README.md b/modules/beta-public-cluster-update-variant/README.md index abdc91ce57..58de967e59 100644 --- a/modules/beta-public-cluster-update-variant/README.md +++ b/modules/beta-public-cluster-update-variant/README.md @@ -266,6 +266,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | | region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no | diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index b20fa74835..8a3f5f1668 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -322,6 +322,14 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { + for_each = local.parallelstore_csi_driver_config + + content { + enabled = parallelstore_csi_driver_config.value.enabled + } + } + istio_config { disabled = !var.istio auth = var.istio_auth diff --git a/modules/beta-public-cluster-update-variant/main.tf b/modules/beta-public-cluster-update-variant/main.tf index a08408273d..9e67566ef0 100644 --- a/modules/beta-public-cluster-update-variant/main.tf +++ b/modules/beta-public-cluster-update-variant/main.tf @@ -88,12 +88,13 @@ locals { enabled = false provider = null }] - cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] - logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] + logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { load_balancer_type = var.cloudrun_load_balancer_type } : {} diff --git a/modules/beta-public-cluster-update-variant/variables.tf b/modules/beta-public-cluster-update-variant/variables.tf index 2d5c215ddd..d8d37963f4 100644 --- a/modules/beta-public-cluster-update-variant/variables.tf +++ b/modules/beta-public-cluster-update-variant/variables.tf @@ -759,6 +759,12 @@ variable "stateful_ha" { default = false } +variable "parallelstore_csi_driver" { + type = bool + description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." + default = false +} + variable "ray_operator_config" { type = object({ enabled = bool diff --git a/modules/beta-public-cluster/README.md b/modules/beta-public-cluster/README.md index 2b2789a5ce..830f008ab2 100644 --- a/modules/beta-public-cluster/README.md +++ b/modules/beta-public-cluster/README.md @@ -244,6 +244,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | | region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no | diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index d76574eb39..5ea6dd4ff1 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -322,6 +322,14 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { + for_each = local.parallelstore_csi_driver_config + + content { + enabled = parallelstore_csi_driver_config.value.enabled + } + } + istio_config { disabled = !var.istio auth = var.istio_auth diff --git a/modules/beta-public-cluster/main.tf b/modules/beta-public-cluster/main.tf index a08408273d..9e67566ef0 100644 --- a/modules/beta-public-cluster/main.tf +++ b/modules/beta-public-cluster/main.tf @@ -88,12 +88,13 @@ locals { enabled = false provider = null }] - cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] - logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] + logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { load_balancer_type = var.cloudrun_load_balancer_type } : {} diff --git a/modules/beta-public-cluster/variables.tf b/modules/beta-public-cluster/variables.tf index 2d5c215ddd..d8d37963f4 100644 --- a/modules/beta-public-cluster/variables.tf +++ b/modules/beta-public-cluster/variables.tf @@ -759,6 +759,12 @@ variable "stateful_ha" { default = false } +variable "parallelstore_csi_driver" { + type = bool + description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." + default = false +} + variable "ray_operator_config" { type = object({ enabled = bool diff --git a/modules/private-cluster-update-variant/README.md b/modules/private-cluster-update-variant/README.md index 7a2b611385..70ff35b5ea 100644 --- a/modules/private-cluster-update-variant/README.md +++ b/modules/private-cluster-update-variant/README.md @@ -264,6 +264,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index fa03099a0c..366759c438 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -308,6 +308,14 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { + for_each = local.parallelstore_csi_driver_config + + content { + enabled = parallelstore_csi_driver_config.value.enabled + } + } + } datapath_provider = var.datapath_provider diff --git a/modules/private-cluster-update-variant/main.tf b/modules/private-cluster-update-variant/main.tf index dac248be86..ffab5eb9d7 100644 --- a/modules/private-cluster-update-variant/main.tf +++ b/modules/private-cluster-update-variant/main.tf @@ -88,12 +88,13 @@ locals { enabled = false provider = null }] - cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] - logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] + logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ security_group = var.authenticator_security_group diff --git a/modules/private-cluster-update-variant/variables.tf b/modules/private-cluster-update-variant/variables.tf index 769a67bb4f..8e57f901e6 100644 --- a/modules/private-cluster-update-variant/variables.tf +++ b/modules/private-cluster-update-variant/variables.tf @@ -771,6 +771,12 @@ variable "stateful_ha" { default = false } +variable "parallelstore_csi_driver" { + type = bool + description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." + default = false +} + variable "ray_operator_config" { type = object({ enabled = bool diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index 49d64bad5f..04779454de 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -242,6 +242,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 3ca8117ae6..d257c3c4e5 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -308,6 +308,14 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { + for_each = local.parallelstore_csi_driver_config + + content { + enabled = parallelstore_csi_driver_config.value.enabled + } + } + } datapath_provider = var.datapath_provider diff --git a/modules/private-cluster/main.tf b/modules/private-cluster/main.tf index dac248be86..ffab5eb9d7 100644 --- a/modules/private-cluster/main.tf +++ b/modules/private-cluster/main.tf @@ -88,12 +88,13 @@ locals { enabled = false provider = null }] - cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] - logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] + logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ security_group = var.authenticator_security_group diff --git a/modules/private-cluster/variables.tf b/modules/private-cluster/variables.tf index 769a67bb4f..8e57f901e6 100644 --- a/modules/private-cluster/variables.tf +++ b/modules/private-cluster/variables.tf @@ -771,6 +771,12 @@ variable "stateful_ha" { default = false } +variable "parallelstore_csi_driver" { + type = bool + description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." + default = false +} + variable "ray_operator_config" { type = object({ enabled = bool diff --git a/variables.tf b/variables.tf index 6b3018c7a5..514f6fc18b 100644 --- a/variables.tf +++ b/variables.tf @@ -735,6 +735,12 @@ variable "stateful_ha" { default = false } +variable "parallelstore_csi_driver" { + type = bool + description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." + default = false +} + variable "ray_operator_config" { type = object({ enabled = bool From 60e8c31f98f256070399a68e34775019b0f05512 Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Mon, 16 Dec 2024 18:21:03 -0500 Subject: [PATCH 2/3] CR comments Signed-off-by: drfaust92 --- autogen/main/cluster.tf.tmpl | 3 +++ autogen/main/main.tf.tmpl | 10 +++++----- autogen/main/variables.tf.tmpl | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index dbe5bf02b4..6c9e0fb6ef 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -388,6 +388,8 @@ resource "google_container_cluster" "primary" { } } + + {% if autopilot_cluster != true %} dynamic "parallelstore_csi_driver_config" { for_each = local.parallelstore_csi_driver_config @@ -395,6 +397,7 @@ resource "google_container_cluster" "primary" { enabled = parallelstore_csi_driver_config.value.enabled } } + {% endif %} {% if beta_cluster and autopilot_cluster != true %} istio_config { diff --git a/autogen/main/main.tf.tmpl b/autogen/main/main.tf.tmpl index 639c96bc29..13aa5f1036 100644 --- a/autogen/main/main.tf.tmpl +++ b/autogen/main/main.tf.tmpl @@ -107,12 +107,12 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null -{% endif %} - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false)? [var.ray_operator_config]: [] +{% endif %} + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false)? [var.ray_operator_config]: [] {% if beta_cluster and autopilot_cluster != true %} cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { load_balancer_type = var.cloudrun_load_balancer_type diff --git a/autogen/main/variables.tf.tmpl b/autogen/main/variables.tf.tmpl index 80a849e928..014f7d4814 100644 --- a/autogen/main/variables.tf.tmpl +++ b/autogen/main/variables.tf.tmpl @@ -834,11 +834,13 @@ variable "stateful_ha" { default = false } +{% if autopilot_cluster != true %} variable "parallelstore_csi_driver" { type = bool description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." - default = false + default = null } +{% endif %} variable "ray_operator_config" { type = object({ From 4db1d923235e1db33ba5c5f8357bdf51e4e722cd Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Mon, 16 Dec 2024 18:27:46 -0500 Subject: [PATCH 3/3] CR comments Signed-off-by: drfaust92 --- README.md | 2 +- cluster.tf | 1 + main.tf | 2 +- modules/beta-autopilot-private-cluster/README.md | 1 - modules/beta-autopilot-private-cluster/cluster.tf | 6 ------ modules/beta-autopilot-private-cluster/main.tf | 9 ++++----- modules/beta-autopilot-private-cluster/variables.tf | 5 ----- modules/beta-autopilot-public-cluster/README.md | 1 - modules/beta-autopilot-public-cluster/cluster.tf | 6 ------ modules/beta-autopilot-public-cluster/main.tf | 9 ++++----- modules/beta-autopilot-public-cluster/variables.tf | 5 ----- modules/beta-private-cluster-update-variant/README.md | 2 +- modules/beta-private-cluster-update-variant/cluster.tf | 1 + modules/beta-private-cluster-update-variant/main.tf | 2 +- modules/beta-private-cluster-update-variant/variables.tf | 2 +- modules/beta-private-cluster/README.md | 2 +- modules/beta-private-cluster/cluster.tf | 1 + modules/beta-private-cluster/main.tf | 2 +- modules/beta-private-cluster/variables.tf | 2 +- modules/beta-public-cluster-update-variant/README.md | 2 +- modules/beta-public-cluster-update-variant/cluster.tf | 1 + modules/beta-public-cluster-update-variant/main.tf | 2 +- modules/beta-public-cluster-update-variant/variables.tf | 2 +- modules/beta-public-cluster/README.md | 2 +- modules/beta-public-cluster/cluster.tf | 1 + modules/beta-public-cluster/main.tf | 2 +- modules/beta-public-cluster/variables.tf | 2 +- modules/private-cluster-update-variant/README.md | 2 +- modules/private-cluster-update-variant/cluster.tf | 1 + modules/private-cluster-update-variant/main.tf | 2 +- modules/private-cluster-update-variant/variables.tf | 2 +- modules/private-cluster/README.md | 2 +- modules/private-cluster/cluster.tf | 1 + modules/private-cluster/main.tf | 2 +- modules/private-cluster/variables.tf | 2 +- variables.tf | 2 +- 36 files changed, 36 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index a27be79044..81095fc1cd 100644 --- a/README.md +++ b/README.md @@ -232,7 +232,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | -| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | | region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no | diff --git a/cluster.tf b/cluster.tf index 91d7bb7300..2c6cc94342 100644 --- a/cluster.tf +++ b/cluster.tf @@ -308,6 +308,7 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { for_each = local.parallelstore_csi_driver_config diff --git a/main.tf b/main.tf index 081c17ffb0..5e4338331e 100644 --- a/main.tf +++ b/main.tf @@ -90,10 +90,10 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ diff --git a/modules/beta-autopilot-private-cluster/README.md b/modules/beta-autopilot-private-cluster/README.md index c248576c03..888c450654 100644 --- a/modules/beta-autopilot-private-cluster/README.md +++ b/modules/beta-autopilot-private-cluster/README.md @@ -137,7 +137,6 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | -| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | diff --git a/modules/beta-autopilot-private-cluster/cluster.tf b/modules/beta-autopilot-private-cluster/cluster.tf index 6ea95d3ccf..f788fbeddb 100644 --- a/modules/beta-autopilot-private-cluster/cluster.tf +++ b/modules/beta-autopilot-private-cluster/cluster.tf @@ -210,13 +210,7 @@ resource "google_container_cluster" "primary" { } } - dynamic "parallelstore_csi_driver_config" { - for_each = local.parallelstore_csi_driver_config - content { - enabled = parallelstore_csi_driver_config.value.enabled - } - } } diff --git a/modules/beta-autopilot-private-cluster/main.tf b/modules/beta-autopilot-private-cluster/main.tf index d90b187b41..e2bd8547a3 100644 --- a/modules/beta-autopilot-private-cluster/main.tf +++ b/modules/beta-autopilot-private-cluster/main.tf @@ -64,11 +64,10 @@ locals { 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 } : {} pod_all_ip_ranges = var.add_cluster_firewall_rules ? compact(concat([local.cluster_alias_ranges_cidr[var.ip_range_pods]], [for range in var.additional_ip_range_pods : local.cluster_alias_ranges_cidr[range] if length(range) > 0])) : [] - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ security_group = var.authenticator_security_group diff --git a/modules/beta-autopilot-private-cluster/variables.tf b/modules/beta-autopilot-private-cluster/variables.tf index 11a8e51d99..5c760668c4 100644 --- a/modules/beta-autopilot-private-cluster/variables.tf +++ b/modules/beta-autopilot-private-cluster/variables.tf @@ -501,11 +501,6 @@ variable "stateful_ha" { default = false } -variable "parallelstore_csi_driver" { - type = bool - description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." - default = false -} variable "ray_operator_config" { type = object({ diff --git a/modules/beta-autopilot-public-cluster/README.md b/modules/beta-autopilot-public-cluster/README.md index f4049edb22..729039e281 100644 --- a/modules/beta-autopilot-public-cluster/README.md +++ b/modules/beta-autopilot-public-cluster/README.md @@ -127,7 +127,6 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | -| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | | region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no | diff --git a/modules/beta-autopilot-public-cluster/cluster.tf b/modules/beta-autopilot-public-cluster/cluster.tf index e40bb13ac1..54415e1194 100644 --- a/modules/beta-autopilot-public-cluster/cluster.tf +++ b/modules/beta-autopilot-public-cluster/cluster.tf @@ -210,13 +210,7 @@ resource "google_container_cluster" "primary" { } } - dynamic "parallelstore_csi_driver_config" { - for_each = local.parallelstore_csi_driver_config - content { - enabled = parallelstore_csi_driver_config.value.enabled - } - } } diff --git a/modules/beta-autopilot-public-cluster/main.tf b/modules/beta-autopilot-public-cluster/main.tf index 6aa3079a5c..5f2e7f7421 100644 --- a/modules/beta-autopilot-public-cluster/main.tf +++ b/modules/beta-autopilot-public-cluster/main.tf @@ -64,11 +64,10 @@ locals { 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 } : {} pod_all_ip_ranges = var.add_cluster_firewall_rules ? compact(concat([local.cluster_alias_ranges_cidr[var.ip_range_pods]], [for range in var.additional_ip_range_pods : local.cluster_alias_ranges_cidr[range] if length(range) > 0])) : [] - gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] - gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] - stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] - ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] + gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] + gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] + stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] + ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ security_group = var.authenticator_security_group diff --git a/modules/beta-autopilot-public-cluster/variables.tf b/modules/beta-autopilot-public-cluster/variables.tf index 96756f8b4b..a47d08f26f 100644 --- a/modules/beta-autopilot-public-cluster/variables.tf +++ b/modules/beta-autopilot-public-cluster/variables.tf @@ -465,11 +465,6 @@ variable "stateful_ha" { default = false } -variable "parallelstore_csi_driver" { - type = bool - description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." - default = false -} variable "ray_operator_config" { type = object({ diff --git a/modules/beta-private-cluster-update-variant/README.md b/modules/beta-private-cluster-update-variant/README.md index 3c89f68ef5..070ef4b5e2 100644 --- a/modules/beta-private-cluster-update-variant/README.md +++ b/modules/beta-private-cluster-update-variant/README.md @@ -276,7 +276,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | -| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `null` | no | | private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index 5160d50524..18bbf55968 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -322,6 +322,7 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { for_each = local.parallelstore_csi_driver_config diff --git a/modules/beta-private-cluster-update-variant/main.tf b/modules/beta-private-cluster-update-variant/main.tf index 79b5a30c6b..3b7f33ccfb 100644 --- a/modules/beta-private-cluster-update-variant/main.tf +++ b/modules/beta-private-cluster-update-variant/main.tf @@ -90,10 +90,10 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { load_balancer_type = var.cloudrun_load_balancer_type diff --git a/modules/beta-private-cluster-update-variant/variables.tf b/modules/beta-private-cluster-update-variant/variables.tf index 37de471fce..238510438c 100644 --- a/modules/beta-private-cluster-update-variant/variables.tf +++ b/modules/beta-private-cluster-update-variant/variables.tf @@ -798,7 +798,7 @@ variable "stateful_ha" { variable "parallelstore_csi_driver" { type = bool description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." - default = false + default = null } variable "ray_operator_config" { diff --git a/modules/beta-private-cluster/README.md b/modules/beta-private-cluster/README.md index ca7ac0463d..19ae74449e 100644 --- a/modules/beta-private-cluster/README.md +++ b/modules/beta-private-cluster/README.md @@ -254,7 +254,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | -| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `null` | no | | private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | diff --git a/modules/beta-private-cluster/cluster.tf b/modules/beta-private-cluster/cluster.tf index a4fc72d825..0ce5cdd0bb 100644 --- a/modules/beta-private-cluster/cluster.tf +++ b/modules/beta-private-cluster/cluster.tf @@ -322,6 +322,7 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { for_each = local.parallelstore_csi_driver_config diff --git a/modules/beta-private-cluster/main.tf b/modules/beta-private-cluster/main.tf index 79b5a30c6b..3b7f33ccfb 100644 --- a/modules/beta-private-cluster/main.tf +++ b/modules/beta-private-cluster/main.tf @@ -90,10 +90,10 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { load_balancer_type = var.cloudrun_load_balancer_type diff --git a/modules/beta-private-cluster/variables.tf b/modules/beta-private-cluster/variables.tf index 37de471fce..238510438c 100644 --- a/modules/beta-private-cluster/variables.tf +++ b/modules/beta-private-cluster/variables.tf @@ -798,7 +798,7 @@ variable "stateful_ha" { variable "parallelstore_csi_driver" { type = bool description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." - default = false + default = null } variable "ray_operator_config" { diff --git a/modules/beta-public-cluster-update-variant/README.md b/modules/beta-public-cluster-update-variant/README.md index 58de967e59..5832cc3eaa 100644 --- a/modules/beta-public-cluster-update-variant/README.md +++ b/modules/beta-public-cluster-update-variant/README.md @@ -266,7 +266,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | -| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | | region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no | diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 8a3f5f1668..fb7e8e86c1 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -322,6 +322,7 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { for_each = local.parallelstore_csi_driver_config diff --git a/modules/beta-public-cluster-update-variant/main.tf b/modules/beta-public-cluster-update-variant/main.tf index 9e67566ef0..e2a795c457 100644 --- a/modules/beta-public-cluster-update-variant/main.tf +++ b/modules/beta-public-cluster-update-variant/main.tf @@ -90,10 +90,10 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { load_balancer_type = var.cloudrun_load_balancer_type diff --git a/modules/beta-public-cluster-update-variant/variables.tf b/modules/beta-public-cluster-update-variant/variables.tf index d8d37963f4..73e9d07a47 100644 --- a/modules/beta-public-cluster-update-variant/variables.tf +++ b/modules/beta-public-cluster-update-variant/variables.tf @@ -762,7 +762,7 @@ variable "stateful_ha" { variable "parallelstore_csi_driver" { type = bool description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." - default = false + default = null } variable "ray_operator_config" { diff --git a/modules/beta-public-cluster/README.md b/modules/beta-public-cluster/README.md index 830f008ab2..edb96c8b43 100644 --- a/modules/beta-public-cluster/README.md +++ b/modules/beta-public-cluster/README.md @@ -244,7 +244,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | -| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | | region | The region to host the cluster in (optional if zonal cluster / required if regional) | `string` | `null` | no | diff --git a/modules/beta-public-cluster/cluster.tf b/modules/beta-public-cluster/cluster.tf index 5ea6dd4ff1..2beb3dc4ae 100644 --- a/modules/beta-public-cluster/cluster.tf +++ b/modules/beta-public-cluster/cluster.tf @@ -322,6 +322,7 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { for_each = local.parallelstore_csi_driver_config diff --git a/modules/beta-public-cluster/main.tf b/modules/beta-public-cluster/main.tf index 9e67566ef0..e2a795c457 100644 --- a/modules/beta-public-cluster/main.tf +++ b/modules/beta-public-cluster/main.tf @@ -90,10 +90,10 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? { load_balancer_type = var.cloudrun_load_balancer_type diff --git a/modules/beta-public-cluster/variables.tf b/modules/beta-public-cluster/variables.tf index d8d37963f4..73e9d07a47 100644 --- a/modules/beta-public-cluster/variables.tf +++ b/modules/beta-public-cluster/variables.tf @@ -762,7 +762,7 @@ variable "stateful_ha" { variable "parallelstore_csi_driver" { type = bool description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." - default = false + default = null } variable "ray_operator_config" { diff --git a/modules/private-cluster-update-variant/README.md b/modules/private-cluster-update-variant/README.md index 70ff35b5ea..6d0fe34aba 100644 --- a/modules/private-cluster-update-variant/README.md +++ b/modules/private-cluster-update-variant/README.md @@ -264,7 +264,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | -| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `null` | no | | private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 366759c438..0b5b990050 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -308,6 +308,7 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { for_each = local.parallelstore_csi_driver_config diff --git a/modules/private-cluster-update-variant/main.tf b/modules/private-cluster-update-variant/main.tf index ffab5eb9d7..c7b34f16f1 100644 --- a/modules/private-cluster-update-variant/main.tf +++ b/modules/private-cluster-update-variant/main.tf @@ -90,10 +90,10 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ diff --git a/modules/private-cluster-update-variant/variables.tf b/modules/private-cluster-update-variant/variables.tf index 8e57f901e6..135bee4aba 100644 --- a/modules/private-cluster-update-variant/variables.tf +++ b/modules/private-cluster-update-variant/variables.tf @@ -774,7 +774,7 @@ variable "stateful_ha" { variable "parallelstore_csi_driver" { type = bool description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." - default = false + default = null } variable "ray_operator_config" { diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index 04779454de..db09c2213a 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -242,7 +242,7 @@ Then perform the following commands on the root folder: | non\_masquerade\_cidrs | List of strings in CIDR notation that specify the IP address ranges that do not use IP masquerading. | `list(string)` |
[
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
| no | | notification\_config\_topic | The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}. | `string` | `""` | no | | notification\_filter\_event\_type | Choose what type of notifications you want to receive. If no filters are applied, you'll receive all notification types. Can be used to filter what notifications are sent. Accepted values are UPGRADE\_AVAILABLE\_EVENT, UPGRADE\_EVENT, and SECURITY\_BULLETIN\_EVENT. | `list(string)` | `[]` | no | -| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `false` | no | +| parallelstore\_csi\_driver | Whether the Parallelstore CSI driver Addon is enabled for this cluster. | `bool` | `null` | no | | private\_endpoint\_subnetwork | The subnetwork to use for the hosted master network. | `string` | `null` | no | | project\_id | The project ID to host the cluster in (required) | `string` | n/a | yes | | ray\_operator\_config | The Ray Operator Addon configuration for this cluster. |
object({
enabled = bool
logging_enabled = optional(bool, false)
monitoring_enabled = optional(bool, false)
})
|
{
"enabled": false,
"logging_enabled": false,
"monitoring_enabled": false
}
| no | diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index d257c3c4e5..68ec008eb3 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -308,6 +308,7 @@ resource "google_container_cluster" "primary" { } } + dynamic "parallelstore_csi_driver_config" { for_each = local.parallelstore_csi_driver_config diff --git a/modules/private-cluster/main.tf b/modules/private-cluster/main.tf index ffab5eb9d7..c7b34f16f1 100644 --- a/modules/private-cluster/main.tf +++ b/modules/private-cluster/main.tf @@ -90,10 +90,10 @@ locals { }] cluster_gce_pd_csi_config = var.gce_pd_csi_driver ? [{ enabled = true }] : [{ enabled = false }] logmon_config_is_set = length(var.logging_enabled_components) > 0 || length(var.monitoring_enabled_components) > 0 || var.monitoring_enable_managed_prometheus != null + parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }] gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : [] stateful_ha_config = var.stateful_ha ? [{ enabled = true }] : [] - parallelstore_csi_driver_config = var.parallelstore_csi_driver ? [{ enabled = true }] : [] ray_operator_config = length(var.ray_operator_config) > 0 && lookup(var.ray_operator_config, "enabled", false) ? [var.ray_operator_config] : [] cluster_authenticator_security_group = var.authenticator_security_group == null ? [] : [{ diff --git a/modules/private-cluster/variables.tf b/modules/private-cluster/variables.tf index 8e57f901e6..135bee4aba 100644 --- a/modules/private-cluster/variables.tf +++ b/modules/private-cluster/variables.tf @@ -774,7 +774,7 @@ variable "stateful_ha" { variable "parallelstore_csi_driver" { type = bool description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." - default = false + default = null } variable "ray_operator_config" { diff --git a/variables.tf b/variables.tf index 514f6fc18b..ded9f6a313 100644 --- a/variables.tf +++ b/variables.tf @@ -738,7 +738,7 @@ variable "stateful_ha" { variable "parallelstore_csi_driver" { type = bool description = "Whether the Parallelstore CSI driver Addon is enabled for this cluster." - default = false + default = null } variable "ray_operator_config" {