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

GKE Nodepool adding tags & labels should not recreate #12620

Closed
1 of 2 tasks
Evesy opened this issue Sep 22, 2022 · 11 comments
Closed
1 of 2 tasks

GKE Nodepool adding tags & labels should not recreate #12620

Evesy opened this issue Sep 22, 2022 · 11 comments
Labels
Milestone

Comments

@Evesy
Copy link

Evesy commented Sep 22, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Affected Resource(s)

  • google_container_node_pool

Previous issue: #2532

The GKE API supports updating tags on an existing node pool; an operation is kicked off which adds network tags to all the existing node pools, similar to a version upgrade operation.

Currently, modifying tags on the google_container_node_pool resource causes it to be deleted & recreated. It feels like this behaviour should be changed to support the inline updating of existing node pools

Maintainer notes

@Evesy Evesy added the bug label Sep 22, 2022
@edwardmedia
Copy link
Contributor

edwardmedia commented Sep 22, 2022

Looks like tags and labels are updatable now

https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters.nodePools/update

Change label to enhancement

@g-awmalik
Copy link

This also applies to labels also reported here. Seems like there is a PR but needs to account for labels as well.

@g-awmalik
Copy link

@edwardmedia - would you like us to create another issue for label or can we track it here?

@edwardmedia
Copy link
Contributor

@g-awmalik we can track labels over here. Let me update the subject

@edwardmedia edwardmedia changed the title GKE Nodepool adding tags should not recreate GKE Nodepool adding tags & labels should not recreate Oct 6, 2022
@slevenick slevenick removed the bug label Oct 7, 2022
@LucaPrete
Copy link
Contributor

Hello, here is the initial PR (under review) that allows to update nodepool labels without causing the nodepools to be re-created.

@melinath melinath added this to the Goals milestone Dec 12, 2022
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Dec 19, 2022
…6941)

Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com>
Co-authored-by: Luca Prete <lucaprete@google.com>
Signed-off-by: Modular Magician <magic-modules@google.com>
modular-magician added a commit that referenced this issue Dec 19, 2022
Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com>
Co-authored-by: Luca Prete <lucaprete@google.com>
Signed-off-by: Modular Magician <magic-modules@google.com>

Signed-off-by: Modular Magician <magic-modules@google.com>
Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com>
Co-authored-by: Luca Prete <lucaprete@google.com>
@korenlev
Copy link

korenlev commented Jan 27, 2023

If the node_pool is configured with auto scaling enabled then Update any metadata in node pool will FAIL with the following google error:

"Updates for 'labels' are not supported in node pools with autoscaling enabled (as a workaround, consider temporarily disabling autoscaling or recreating the node pool with the updated values.)"

You can publish this error back to the user,
so he can decide to use this temp workaround by google or not.
You can validate this with upstream (the relationship with auto scaling property).

@michaelbannister
Copy link
Contributor

According to this doc since GKE 1.23.4-gke.300 nodepool labels may be modified in-place even if cluster auotscaler is enabled.

@michaelbannister
Copy link
Contributor

Ah, just found this was released in provider version 4.48.0 (changelog)– should this issue be closed?

@rileykarson
Copy link
Collaborator

Labels are possible, but network tags are not. I'll update the issue. It does seem possible to update them: https://cloud.google.com/kubernetes-engine/docs/how-to/autopilot-network-tags#standard_1

@melinath
Copy link
Collaborator

I believe this was resolved by GoogleCloudPlatform/magic-modules#6599 - even though the title of the PR (and the release note) talk about labels, the actual implementation seems to add support for updating network tags.

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants