-
Notifications
You must be signed in to change notification settings - Fork 266
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
Label and Annotation key validation does not allow the "/" char, resulting in label with truncated key #12720
Comments
Linking issues that might be affected by keyvalue component bug |
I've noticed this on other use cases of the label and annotation component, but it's when focus is removed from the key input that the row is removed. Looking at the yaml the key is added (with empty string) |
I don't think that this is directly related to #11226, but it's something to look out for; we previously modified input on every keypress in the yaml editor and we could be doing something similar here. |
Linking #13005 (contains example video) |
When looking at this need to determine how #13070 is involved and would impact the fix |
#10958 is also in the mix here as we see more validation bugs come in around this area. |
We need this to unblock #13069 |
Linking e2e tests that's probably blocked on this #13191 |
Setup
Describe the bug
In the Registration creation component of the Elemental UI extension it is not possible to add Label and Annotation templates with keys having the "/" character.
In particular as soon as the "/" char is typed in the
key
field, the row disappears from the UI.Moreover, if the resource is created, the resulting resource (looking at the yaml) will contain the templates label/annotation with the key (which will be anyway truncated with what was typed in till the UI row disappeared).
See attached video.
To Reproduce
Add a Label/Annotation with a key containing "/" (e.g.,
elemental.cattle.io/InternalIP
).Result
Row disappear while typing, but label is present with a truncated label key in the created resource
Expected Result
The Label and Annotation rows do not disappear from the UI when keys are valid.
The labels key validation should match the Kubernetes label keys syntax: see https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set .
Screenshots
Video:
https://github.com/user-attachments/assets/cbe1cb93-b748-4ff8-aef2-7e577ce87f62
Additional context
After checking with @aalves08, he suggested to track here the issue as the component used in the Elemental UI belongs here.
The text was updated successfully, but these errors were encountered: