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

resource_labels added to the node_config nodepool #2317

Conversation

fulyagonultas
Copy link
Contributor

@fulyagonultas fulyagonultas commented May 28, 2024

Resource labels is needed in node_config block of nodepool module


Checklist

I applicable, I acknowledge that I have:

  • Read the contributing guide
  • Ran terraform fmt on all modified files
  • Regenerated the relevant README.md files using tools/tfdoc.py
  • Made sure all relevant tests pass

Copy link

google-cla bot commented May 28, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@juliocc juliocc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fulyagonultas, it seems labels and resource_labels serve different purposes. Can you keep labels and add a new field/variable for resource_labels? And you'll probably want to do the same in the gke-clustar-standard and gke-cluster-autopilot

@fulyagonultas
Copy link
Contributor Author

Hi @fulyagonultas, it seems labels and resource_labels serve different purposes. Can you keep labels and add a new field/variable for resource_labels? And you'll probably want to do the same in the gke-clustar-standard and gke-cluster-autopilot

hi @juliocc, thanks for the heads-up!
node_config is only available for nodepool and standard modules as in autopilot node configuration is managed by Google.
I've added labels&resource labels into nodepool&standard modules also set them mandatory, but not sure if they need to be optional in CFF module to make it more flexible. Please review and let me know what needs to be changed

@juliocc
Copy link
Collaborator

juliocc commented May 29, 2024

hi @fulyagonultas, we just had an internal discussion about this and we think the best approach is the following:

  • Keep var.labels for what GKE resources call resource_labels. This is what we do in all other modules (including gke-cluster-standard) and we don't want to introduce different semantics here.
  • Introduce a new variable for gke/k8s labels (e.g. k8s_labels) and use that for what GKE nodes call labels.

So in summary, keep var.labels as it is and add a new variable/field for kubernetes labels.

Can you make these changes? Sorry for the mixup, but I didn't fully understand what you were trying to do initially.

@juliocc
Copy link
Collaborator

juliocc commented May 29, 2024

@fulyagonultas I took the liberty to apply the changes. I'm working through the tests now

@juliocc juliocc enabled auto-merge (squash) May 29, 2024 12:56
@juliocc juliocc merged commit 0d60e39 into GoogleCloudPlatform:master May 29, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants