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

Put the schematic ID in a node annotation #9089

Closed
tjwallace opened this issue Jul 31, 2024 · 6 comments · Fixed by #9093
Closed

Put the schematic ID in a node annotation #9089

tjwallace opened this issue Jul 31, 2024 · 6 comments · Fixed by #9093
Assignees

Comments

@tjwallace
Copy link

Feature Request

Put the schematic ID in a node annotation

Description

It would be helpful for automations like system-upgrade-controller to have the Talos schematic ID in a node annotations (ie cluster.talos.dev/schematic-id) so it can be used to pull the correct installer image.

Currently my cluster needs two different schematic IDs so I cannot set a single value in my system-upgrade-controller plan.

Thanks!

@smira
Copy link
Member

smira commented Jul 31, 2024

See #9070, if the extensions will be exposed via node labels, the schematic will be exposed as wll.

@tjwallace
Copy link
Author

tjwallace commented Jul 31, 2024

@smira one issue is the schematic id is too long for a node label (siderolabs/image-factory#126)

@smira
Copy link
Member

smira commented Jul 31, 2024

yeah, true, I believe annotations have same limits (?). Certainly some extensions make more sense as labels (e.g. "I have nvidia"), while schematic is fine as an annotation (as it makes less sense to filter on it)

@tjwallace
Copy link
Author

Annotations can be up to 256kb

@smira
Copy link
Member

smira commented Jul 31, 2024

thanks @tjwallace, so it sounds like we'd need to split them across labels/annotations based on extension version length (as schematic virtual extension has schematic ID as a version).

That doesn't sound too bad for me.

@smira
Copy link
Member

smira commented Jul 31, 2024

$ kubectl describe nodes talos-default-worker-1
Name:               talos-default-worker-1
Roles:              <none>
Labels:             beta.kubernetes.io/arch=amd64
                    extensions.talos.dev/spin=v0.13.1
				...

smira added a commit to smira/talos that referenced this issue Jul 31, 2024
Extensions are posted the following way:

`extentions.talos.dev/<name>=<version>`

The name should be valid as a label (annotation) key.

If the value is valid as a label value, use labels, otherwise use
annotations.

Also implements node annotations in the machine config as a side-effect.

Fixes siderolabs#9089

Fixes siderolabs#8971

See siderolabs#9070

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
@smira smira self-assigned this Aug 1, 2024
smira added a commit to smira/talos that referenced this issue Aug 1, 2024
Extensions are posted the following way:

`extentions.talos.dev/<name>=<version>`

The name should be valid as a label (annotation) key.

If the value is valid as a label value, use labels, otherwise use
annotations.

Also implements node annotations in the machine config as a side-effect.

Fixes siderolabs#9089

Fixes siderolabs#8971

See siderolabs#9070

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants