Skip to content

Commit

Permalink
Fix gcs fuse csi default false to null
Browse files Browse the repository at this point in the history
False causes a rolling update of existing cluster
control planes, just because it explicitly sets
it to false.

Default null prevents that by allowing to make
the add-on block conditional.
  • Loading branch information
pst committed Aug 16, 2023
1 parent d0404b3 commit da11ef8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions google/_modules/gke/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ resource "google_container_cluster" "current" {
disabled = false
}

gcs_fuse_csi_driver_config {
enabled = var.enable_gcs_fuse_csi_driver
dynamic "gcs_fuse_csi_driver_config" {
for_each = var.enable_gcs_fuse_csi_driver != null ? [1] : []

content {
enabled = var.enable_gcs_fuse_csi_driver
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion google/cluster/configuration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ locals {
monitoring_config_enable_components_lookup = lookup(local.cfg, "monitoring_config_enable_components", "SYSTEM_COMPONENTS")
monitoring_config_enable_components = compact(split(",", local.monitoring_config_enable_components_lookup))

enable_gcs_fuse_csi_driver = lookup(local.cfg, "enable_gcs_fuse_csi_driver", false)
enable_gcs_fuse_csi_driver = lookup(local.cfg, "enable_gcs_fuse_csi_driver", null)
}

0 comments on commit da11ef8

Please sign in to comment.