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

Use labels instead of tags to identify Machines #7

Closed
Tracked by #724
zuzzas opened this issue Sep 23, 2020 · 4 comments
Closed
Tracked by #724

Use labels instead of tags to identify Machines #7

zuzzas opened this issue Sep 23, 2020 · 4 comments
Labels
area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/enhancement Enhancement, improvement, extension lifecycle/stale Nobody worked on this for 6 months (will further age) needs/planning Needs (more) planning with other MCM maintainers priority/4 Priority (lower number equals higher priority) status/closed Issue is closed (either delivered or triaged)

Comments

@zuzzas
Copy link

zuzzas commented Sep 23, 2020

What would you like to be added:

We should use labels to generate Machine to GCE Instance mapping.

Why is this needed:

GCP has three types of "metadata":

  • tags — used for the firewall rules.
  • labels — used for grouping and quering labeled resources of all types.
  • metadata — also k/v used when an Instance accesses the metadata server. To query something instance-specific.

It is not correct to use tags to identify resources, we should rely on labels to do this. We'll also have a much more efficient listing option: https://cloud.google.com/compute/docs/labeling-resources#api_3

@zuzzas zuzzas added the kind/enhancement Enhancement, improvement, extension label Sep 23, 2020
@gardener-robot gardener-robot added lifecycle/stale Nobody worked on this for 6 months (will further age) labels Nov 23, 2020
@gardener-robot gardener-robot added lifecycle/rotten Nobody worked on this for 12 months (final aging stage) and removed lifecycle/stale Nobody worked on this for 6 months (will further age) labels Sep 22, 2021
@himanshu-kun himanshu-kun added needs/planning Needs (more) planning with other MCM maintainers area/quality Output qualification (tests, checks, scans, automation in general, etc.) related priority/4 Priority (lower number equals higher priority) and removed lifecycle/rotten Nobody worked on this for 12 months (final aging stage) labels Feb 27, 2023
@gardener-robot gardener-robot added the lifecycle/stale Nobody worked on this for 6 months (will further age) label Nov 6, 2023
@vlerenc
Copy link
Member

vlerenc commented Feb 28, 2024

Thanks @zuzzas. I had the same issue.

However, it appears (just checked a random machine) that we now do that, do we @rishabh-11 @elankath?

Is that now guaranteed that we use labels (e.g. with the technical ID such as labels.k8s-cluster-name={shoot.status.technicalID}), i.e. can I rely on that? Since when (approx.) is that the case/can I expect all GCP machines managed in a Gardener landscape to have labels/this label now?

@rishabh-11
Copy link
Contributor

Is that now guaranteed that we use labels (e.g. with the technical ID such as labels.k8s-cluster-name={shoot.status.technicalID}), i.e. can I rely on that?

This label is added in the machine class provider spec by gardener/gardener-extension-provider-gcp#669. It has also reached the landscapes so any new machines created will have the label labels.k8s-cluster-name={shoot.status.technicalID}. But the instances existing before this change will not be affected and won't have the label

@rishabh-11
Copy link
Contributor

Since when (approx.) is that the case/can I expect all GCP machines managed in a Gardener landscape to have labels/this label now?

This will happen when all the machines existing before the change are replaced with new ones. This will depend on the cluster's hibernation schedule, any worker spec change, etc. which cause a rolling update. so I can't say for certain.

@rishabh-11
Copy link
Contributor

@zuzzas, if you are using Gardener, you can specify the labels in the worker section of the shoot yaml, and they will be added to the VM created by the cloud provider. If you are using MCM standalone, you need to add it in the providerSpec of the machine class so that MCM can pick it up from there while creating the VM.

/close

@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/enhancement Enhancement, improvement, extension lifecycle/stale Nobody worked on this for 6 months (will further age) needs/planning Needs (more) planning with other MCM maintainers priority/4 Priority (lower number equals higher priority) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

No branches or pull requests

5 participants