-
Notifications
You must be signed in to change notification settings - Fork 17
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
metadata.labels lost its flexibility #48
Comments
63 characters limit is an upstream limitation: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
|
The issue may actually be that the |
@kkaempf was smbios disabled for this? I dont know about it but seems like that content should be resolved to the actual data, but if smbios is disabled, maybe that data is not available and its not interpreted properly? |
It already fails when I |
looks like the machine name was resolved but somehow is being copied into the labels and that fails, as is not resolved?
|
ok, seems that we dont support smbios substitution for labels as you can see here: https://github.com/rancher/elemental-operator/blob/main/pkg/server/register.go#L130 Only the name is parsed via the smbios stuff. Labels are copied as-is. @kkaempf Can you post the full machineinventory.yaml ? There is no reason the labels would contain anything from the name unless racher/k8s/operator does some mangling and copies the machineName into the labels somehow, but nothing that I can see.
There should be no reason for that, machineName is a string which has no limit, I just applied the same yaml locally without issues. Please post the yaml file being applied because there may be something wrong with it |
|
This is the file I try to |
Argh. Not sure where I failed. Tried it again and it works 🤦🏻 |
Im wondering if there was an error on the yaml and it took the |
Hmm, I have to reopen this. I know that the yaml is correct. Rancher UI shows me
But the operator log on the management cluster complains
What am I missing ? |
You are not missing anything. In fact it's the other way around. You are passing the machineName as a machineInventoryLabel so it's getting parsed as a label and that doesn't interpolate anything, it stores what you pass literally. Try to remove two spaces in front of your machineName. |
Proper yaml:
|
Thanks, confirmed working |
Andrew's (successful) run with Jacob's code had
in its
machineRegistration
However, with the current elemental-operator, the line above gets rejected with
in the elemental-operator log in the management cluster.
Even shortening it to
still doesn't work
The text was updated successfully, but these errors were encountered: