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: node pool options cannot be set to false #2187

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
6 changes: 2 additions & 4 deletions autogen/main/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ locals {
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
{% if autopilot_cluster != true %}
// Build a map of maps of node pools from a list of objects
node_pool_names = [for np in toset(var.node_pools) : np.name]
node_pools = zipmap(local.node_pool_names, tolist(toset(var.node_pools)))
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
node_pools = {for np in var.node_pools: np.name => np}
windows_node_pools = {for np in var.windows_node_pools: np.name => np}
{% endif %}

fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null
Expand Down
6 changes: 2 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ locals {
master_version_zonal = var.kubernetes_version != "latest" ? var.kubernetes_version : data.google_container_engine_versions.zone.latest_master_version
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
// Build a map of maps of node pools from a list of objects
node_pool_names = [for np in toset(var.node_pools) : np.name]
node_pools = zipmap(local.node_pool_names, tolist(toset(var.node_pools)))
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
node_pools = { for np in var.node_pools : np.name => np }
windows_node_pools = { for np in var.windows_node_pools : np.name => np }

fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null

Expand Down
6 changes: 2 additions & 4 deletions modules/beta-private-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ locals {
master_version_zonal = var.kubernetes_version != "latest" ? var.kubernetes_version : data.google_container_engine_versions.zone.latest_master_version
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
// Build a map of maps of node pools from a list of objects
node_pool_names = [for np in toset(var.node_pools) : np.name]
node_pools = zipmap(local.node_pool_names, tolist(toset(var.node_pools)))
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
node_pools = { for np in var.node_pools : np.name => np }
windows_node_pools = { for np in var.windows_node_pools : np.name => np }

fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null

Expand Down
6 changes: 2 additions & 4 deletions modules/beta-private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ locals {
master_version_zonal = var.kubernetes_version != "latest" ? var.kubernetes_version : data.google_container_engine_versions.zone.latest_master_version
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
// Build a map of maps of node pools from a list of objects
node_pool_names = [for np in toset(var.node_pools) : np.name]
node_pools = zipmap(local.node_pool_names, tolist(toset(var.node_pools)))
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
node_pools = { for np in var.node_pools : np.name => np }
windows_node_pools = { for np in var.windows_node_pools : np.name => np }

fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null

Expand Down
6 changes: 2 additions & 4 deletions modules/beta-public-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ locals {
master_version_zonal = var.kubernetes_version != "latest" ? var.kubernetes_version : data.google_container_engine_versions.zone.latest_master_version
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
// Build a map of maps of node pools from a list of objects
node_pool_names = [for np in toset(var.node_pools) : np.name]
node_pools = zipmap(local.node_pool_names, tolist(toset(var.node_pools)))
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
node_pools = { for np in var.node_pools : np.name => np }
windows_node_pools = { for np in var.windows_node_pools : np.name => np }

fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null

Expand Down
6 changes: 2 additions & 4 deletions modules/beta-public-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ locals {
master_version_zonal = var.kubernetes_version != "latest" ? var.kubernetes_version : data.google_container_engine_versions.zone.latest_master_version
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
// Build a map of maps of node pools from a list of objects
node_pool_names = [for np in toset(var.node_pools) : np.name]
node_pools = zipmap(local.node_pool_names, tolist(toset(var.node_pools)))
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
node_pools = { for np in var.node_pools : np.name => np }
windows_node_pools = { for np in var.windows_node_pools : np.name => np }

fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null

Expand Down
6 changes: 2 additions & 4 deletions modules/private-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ locals {
master_version_zonal = var.kubernetes_version != "latest" ? var.kubernetes_version : data.google_container_engine_versions.zone.latest_master_version
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
// Build a map of maps of node pools from a list of objects
node_pool_names = [for np in toset(var.node_pools) : np.name]
node_pools = zipmap(local.node_pool_names, tolist(toset(var.node_pools)))
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
node_pools = { for np in var.node_pools : np.name => np }
windows_node_pools = { for np in var.windows_node_pools : np.name => np }

fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null

Expand Down
6 changes: 2 additions & 4 deletions modules/private-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ locals {
master_version_zonal = var.kubernetes_version != "latest" ? var.kubernetes_version : data.google_container_engine_versions.zone.latest_master_version
master_version = var.regional ? local.master_version_regional : local.master_version_zonal
// Build a map of maps of node pools from a list of objects
node_pool_names = [for np in toset(var.node_pools) : np.name]
node_pools = zipmap(local.node_pool_names, tolist(toset(var.node_pools)))
windows_node_pool_names = [for np in toset(var.windows_node_pools) : np.name]
windows_node_pools = zipmap(local.windows_node_pool_names, tolist(toset(var.windows_node_pools)))
node_pools = { for np in var.node_pools : np.name => np }
windows_node_pools = { for np in var.windows_node_pools : np.name => np }

fleet_membership = var.fleet_project != null ? google_container_cluster.primary.fleet[0].membership : null

Expand Down