From 372a11c781479e0387231acfda4a724cdd46cc65 Mon Sep 17 00:00:00 2001 From: Jinoo <51926360+jinoobaek-qz@users.noreply.github.com> Date: Tue, 12 Jan 2021 14:37:23 -0500 Subject: [PATCH] feat: Add nodepool taints to keepers for update-variant (#717) --- autogen/main/cluster.tf.tmpl | 12 ++++++++++++ .../beta-private-cluster-update-variant/cluster.tf | 12 ++++++++++++ .../beta-public-cluster-update-variant/cluster.tf | 12 ++++++++++++ modules/private-cluster-update-variant/cluster.tf | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index be57e17a4..4c6ab3db8 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -375,6 +375,18 @@ resource "random_id" "name" { ) ) }, + { + taints = join(",", + sort( + flatten( + concat( + [for all_taints in local.node_pools_taints["all"] : "all/${all_taints.key}/${all_taints.value}/${all_taints.effect}"], + [for each_pool_taint in local.node_pools_taints[each.value["name"]] : "${each.value["name"]}/${each_pool_taint.key}/${each_pool_taint.value}/${each_pool_taint.effect}"], + ) + ) + ) + ) + }, { metadata = join(",", sort( diff --git a/modules/beta-private-cluster-update-variant/cluster.tf b/modules/beta-private-cluster-update-variant/cluster.tf index 208608fbd..fcd586eca 100644 --- a/modules/beta-private-cluster-update-variant/cluster.tf +++ b/modules/beta-private-cluster-update-variant/cluster.tf @@ -343,6 +343,18 @@ resource "random_id" "name" { ) ) }, + { + taints = join(",", + sort( + flatten( + concat( + [for all_taints in local.node_pools_taints["all"] : "all/${all_taints.key}/${all_taints.value}/${all_taints.effect}"], + [for each_pool_taint in local.node_pools_taints[each.value["name"]] : "${each.value["name"]}/${each_pool_taint.key}/${each_pool_taint.value}/${each_pool_taint.effect}"], + ) + ) + ) + ) + }, { metadata = join(",", sort( diff --git a/modules/beta-public-cluster-update-variant/cluster.tf b/modules/beta-public-cluster-update-variant/cluster.tf index 642f83f8d..00bc55fb8 100644 --- a/modules/beta-public-cluster-update-variant/cluster.tf +++ b/modules/beta-public-cluster-update-variant/cluster.tf @@ -324,6 +324,18 @@ resource "random_id" "name" { ) ) }, + { + taints = join(",", + sort( + flatten( + concat( + [for all_taints in local.node_pools_taints["all"] : "all/${all_taints.key}/${all_taints.value}/${all_taints.effect}"], + [for each_pool_taint in local.node_pools_taints[each.value["name"]] : "${each.value["name"]}/${each_pool_taint.key}/${each_pool_taint.value}/${each_pool_taint.effect}"], + ) + ) + ) + ) + }, { metadata = join(",", sort( diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index cecbf97cf..ce0c42e25 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -241,6 +241,18 @@ resource "random_id" "name" { ) ) }, + { + taints = join(",", + sort( + flatten( + concat( + [for all_taints in local.node_pools_taints["all"] : "all/${all_taints.key}/${all_taints.value}/${all_taints.effect}"], + [for each_pool_taint in local.node_pools_taints[each.value["name"]] : "${each.value["name"]}/${each_pool_taint.key}/${each_pool_taint.value}/${each_pool_taint.effect}"], + ) + ) + ) + ) + }, { metadata = join(",", sort(