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

beta-private-cluster-update-variant should generate new node pool ID if node_pools_taints is changed #699

Closed
eripa opened this issue Oct 7, 2020 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers P2 high priority issues triaged Scoped and ready for work

Comments

@eripa
Copy link

eripa commented Oct 7, 2020

beta-private-cluster-update-variant does not currently generate a new node pool random suffix is node_pools_taints is changed. This results in a name conflict error, like:

Error: error creating NodePool: googleapi: Error 409: Already exists: projects/example-project/locations/us-west4/clusters/cluster1/nodePools/default-node-pool-aa6d., alreadyExists

resource "random_id" "name" {
for_each = local.node_pools
byte_length = 2
prefix = format("%s-", lookup(each.value, "name"))
keepers = merge(
zipmap(
local.force_node_pool_recreation_resources,
[for keeper in local.force_node_pool_recreation_resources : lookup(each.value, keeper, "")]
),
{
labels = join(",",
sort(
concat(
keys(local.node_pools_labels["all"]),
values(local.node_pools_labels["all"]),
keys(local.node_pools_labels[each.value["name"]]),
values(local.node_pools_labels[each.value["name"]])
)
)
)
},
{
metadata = join(",",
sort(
concat(
keys(local.node_pools_metadata["all"]),
values(local.node_pools_metadata["all"]),
keys(local.node_pools_metadata[each.value["name"]]),
values(local.node_pools_metadata[each.value["name"]])
)
)
)
},
{
oauth_scopes = join(",",
sort(
concat(
local.node_pools_oauth_scopes["all"],
local.node_pools_oauth_scopes[each.value["name"]]
)
)
)
},
{
tags = join(",",
sort(
concat(
local.node_pools_tags["all"],
local.node_pools_tags[each.value["name"]]
)
)
)
}
)
}

@morgante
Copy link
Contributor

morgante commented Oct 7, 2020

@morgante morgante added bug Something isn't working P2 high priority issues triaged Scoped and ready for work good first issue Good for newcomers labels Oct 7, 2020
@jinoobaek-qz
Copy link
Contributor

Thanks, it just needs to be added here: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/master/autogen/main/cluster.tf.tmpl#L333

Happy to review a PR.

Took a very naive stab at it. #717

@DrFaust92
Copy link
Contributor

@apeabody can be closed

@apeabody
Copy link
Contributor

apeabody commented Aug 5, 2024

Implemented in #717

@apeabody apeabody closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers P2 high priority issues triaged Scoped and ready for work
Projects
None yet
Development

No branches or pull requests

6 participants
@eripa @morgante @apeabody @DrFaust92 @jinoobaek-qz and others