Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove fuse csi driver from autopilot #2218

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -344,21 +344,21 @@ resource "google_container_cluster" "primary" {
config_connector_config {
enabled = var.config_connector
}
{% endif %}

dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config
dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config

content {
enabled = gke_backup_agent_config.value.enabled
enabled = gcs_fuse_csi_driver_config.value.enabled
}
}
{% endif %}

dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config
dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config

content {
enabled = gcs_fuse_csi_driver_config.value.enabled
enabled = gke_backup_agent_config.value.enabled
}
}

Expand Down
2 changes: 1 addition & 1 deletion autogen/main/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ 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
gcs_fuse_csi_driver_config = var.gcs_fuse_csi_driver ? [{ enabled = true }] : []
{% 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 %}
Expand Down
11 changes: 5 additions & 6 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -815,16 +815,15 @@ variable "gce_pd_csi_driver" {
default = true
}

{% endif %}
variable "gke_backup_agent_config" {
variable "gcs_fuse_csi_driver" {
type = bool
description = "Whether Backup for GKE agent is enabled for this cluster."
description = "Whether GCE FUSE CSI driver is enabled for this cluster."
default = false
}

variable "gcs_fuse_csi_driver" {
{% endif %}
variable "gke_backup_agent_config" {
type = bool
description = "Whether GCE FUSE CSI driver is enabled for this cluster."
description = "Whether Backup for GKE agent is enabled for this cluster."
default = false
}

Expand Down
12 changes: 6 additions & 6 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,19 @@ resource "google_container_cluster" "primary" {
enabled = var.config_connector
}

dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config
dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config

content {
enabled = gke_backup_agent_config.value.enabled
enabled = gcs_fuse_csi_driver_config.value.enabled
}
}

dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config
dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config

content {
enabled = gcs_fuse_csi_driver_config.value.enabled
enabled = gke_backup_agent_config.value.enabled
}
}

Expand Down
1 change: 0 additions & 1 deletion examples/simple_autopilot_public/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ module "gke" {
network_tags = [local.cluster_type]
deletion_protection = false
enable_l4_ilb_subsetting = true
gcs_fuse_csi_driver = true
stateful_ha = false
gke_backup_agent_config = false
ray_operator_config = {
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ 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
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 }] : []
gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }]
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] : []

Expand Down
1 change: 0 additions & 1 deletion modules/beta-autopilot-private-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ Then perform the following commands on the root folder:
| fleet\_project\_grant\_service\_agent | (Optional) Grant the fleet project service identity the `roles/gkehub.serviceAgent` and `roles/gkehub.crossProjectServiceAgent` roles. | `bool` | `false` | no |
| gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no |
| gcp\_public\_cidrs\_access\_enabled | Allow access through Google Cloud public IP addresses | `bool` | `null` | no |
| gcs\_fuse\_csi\_driver | Whether GCE FUSE CSI driver is enabled for this cluster. | `bool` | `false` | no |
| gke\_backup\_agent\_config | Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no |
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer and artifactregistry.reader roles. | `bool` | `false` | no |
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | `bool` | `true` | no |
Expand Down
8 changes: 0 additions & 8 deletions modules/beta-autopilot-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,6 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config

content {
enabled = gcs_fuse_csi_driver_config.value.enabled
}
}

dynamic "stateful_ha_config" {
for_each = local.stateful_ha_config

Expand Down
7 changes: 3 additions & 4 deletions modules/beta-autopilot-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ 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 }]
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
Expand Down
6 changes: 0 additions & 6 deletions modules/beta-autopilot-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,6 @@ variable "gke_backup_agent_config" {
default = false
}

variable "gcs_fuse_csi_driver" {
type = bool
description = "Whether GCE FUSE CSI driver is enabled for this cluster."
default = false
}

variable "stateful_ha" {
type = bool
description = "Whether the Stateful HA Addon is enabled for this cluster."
Expand Down
1 change: 0 additions & 1 deletion modules/beta-autopilot-public-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ Then perform the following commands on the root folder:
| fleet\_project\_grant\_service\_agent | (Optional) Grant the fleet project service identity the `roles/gkehub.serviceAgent` and `roles/gkehub.crossProjectServiceAgent` roles. | `bool` | `false` | no |
| gateway\_api\_channel | The gateway api channel of this cluster. Accepted values are `CHANNEL_STANDARD` and `CHANNEL_DISABLED`. | `string` | `null` | no |
| gcp\_public\_cidrs\_access\_enabled | Allow access through Google Cloud public IP addresses | `bool` | `null` | no |
| gcs\_fuse\_csi\_driver | Whether GCE FUSE CSI driver is enabled for this cluster. | `bool` | `false` | no |
| gke\_backup\_agent\_config | Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no |
| grant\_registry\_access | Grants created cluster-specific service account storage.objectViewer and artifactregistry.reader roles. | `bool` | `false` | no |
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | `bool` | `true` | no |
Expand Down
8 changes: 0 additions & 8 deletions modules/beta-autopilot-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,6 @@ resource "google_container_cluster" "primary" {
}
}

dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config

content {
enabled = gcs_fuse_csi_driver_config.value.enabled
}
}

dynamic "stateful_ha_config" {
for_each = local.stateful_ha_config

Expand Down
7 changes: 3 additions & 4 deletions modules/beta-autopilot-public-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ 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 }]
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
Expand Down
6 changes: 0 additions & 6 deletions modules/beta-autopilot-public-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,6 @@ variable "gke_backup_agent_config" {
default = false
}

variable "gcs_fuse_csi_driver" {
type = bool
description = "Whether GCE FUSE CSI driver is enabled for this cluster."
default = false
}

variable "stateful_ha" {
type = bool
description = "Whether the Stateful HA Addon is enabled for this cluster."
Expand Down
12 changes: 6 additions & 6 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,19 @@ resource "google_container_cluster" "primary" {
enabled = var.config_connector
}

dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config
dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config

content {
enabled = gke_backup_agent_config.value.enabled
enabled = gcs_fuse_csi_driver_config.value.enabled
}
}

dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config
dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config

content {
enabled = gcs_fuse_csi_driver_config.value.enabled
enabled = gke_backup_agent_config.value.enabled
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ 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
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 }] : []
gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }]
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_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? {
Expand Down
9 changes: 4 additions & 5 deletions modules/beta-private-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -777,15 +777,14 @@ variable "gce_pd_csi_driver" {
default = true
}

variable "gke_backup_agent_config" {
variable "gcs_fuse_csi_driver" {
type = bool
description = "Whether Backup for GKE agent is enabled for this cluster."
description = "Whether GCE FUSE CSI driver is enabled for this cluster."
default = false
}

variable "gcs_fuse_csi_driver" {
variable "gke_backup_agent_config" {
type = bool
description = "Whether GCE FUSE CSI driver is enabled for this cluster."
description = "Whether Backup for GKE agent is enabled for this cluster."
default = false
}

Expand Down
12 changes: 6 additions & 6 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,19 @@ resource "google_container_cluster" "primary" {
enabled = var.config_connector
}

dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config
dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config

content {
enabled = gke_backup_agent_config.value.enabled
enabled = gcs_fuse_csi_driver_config.value.enabled
}
}

dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config
dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config

content {
enabled = gcs_fuse_csi_driver_config.value.enabled
enabled = gke_backup_agent_config.value.enabled
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/beta-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ 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
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 }] : []
gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }]
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_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? {
Expand Down
9 changes: 4 additions & 5 deletions modules/beta-private-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -777,15 +777,14 @@ variable "gce_pd_csi_driver" {
default = true
}

variable "gke_backup_agent_config" {
variable "gcs_fuse_csi_driver" {
type = bool
description = "Whether Backup for GKE agent is enabled for this cluster."
description = "Whether GCE FUSE CSI driver is enabled for this cluster."
default = false
}

variable "gcs_fuse_csi_driver" {
variable "gke_backup_agent_config" {
type = bool
description = "Whether GCE FUSE CSI driver is enabled for this cluster."
description = "Whether Backup for GKE agent is enabled for this cluster."
default = false
}

Expand Down
12 changes: 6 additions & 6 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,19 @@ resource "google_container_cluster" "primary" {
enabled = var.config_connector
}

dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config
dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config

content {
enabled = gke_backup_agent_config.value.enabled
enabled = gcs_fuse_csi_driver_config.value.enabled
}
}

dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config
dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config

content {
enabled = gcs_fuse_csi_driver_config.value.enabled
enabled = gke_backup_agent_config.value.enabled
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/beta-public-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ 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
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 }] : []
gke_backup_agent_config = var.gke_backup_agent_config ? [{ enabled = true }] : [{ enabled = false }]
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_cloudrun_config_load_balancer_config = (var.cloudrun && var.cloudrun_load_balancer_type != "") ? {
Expand Down
9 changes: 4 additions & 5 deletions modules/beta-public-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -741,15 +741,14 @@ variable "gce_pd_csi_driver" {
default = true
}

variable "gke_backup_agent_config" {
variable "gcs_fuse_csi_driver" {
type = bool
description = "Whether Backup for GKE agent is enabled for this cluster."
description = "Whether GCE FUSE CSI driver is enabled for this cluster."
default = false
}

variable "gcs_fuse_csi_driver" {
variable "gke_backup_agent_config" {
type = bool
description = "Whether GCE FUSE CSI driver is enabled for this cluster."
description = "Whether Backup for GKE agent is enabled for this cluster."
default = false
}

Expand Down
12 changes: 6 additions & 6 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -282,19 +282,19 @@ resource "google_container_cluster" "primary" {
enabled = var.config_connector
}

dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config
dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config

content {
enabled = gke_backup_agent_config.value.enabled
enabled = gcs_fuse_csi_driver_config.value.enabled
}
}

dynamic "gcs_fuse_csi_driver_config" {
for_each = local.gcs_fuse_csi_driver_config
dynamic "gke_backup_agent_config" {
for_each = local.gke_backup_agent_config

content {
enabled = gcs_fuse_csi_driver_config.value.enabled
enabled = gke_backup_agent_config.value.enabled
}
}

Expand Down
Loading
Loading