-
Notifications
You must be signed in to change notification settings - Fork 47
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
Names longer than 63 chars crash operator completely #169
Comments
I do like label-selectors over annotations (via field-selectors). Since I use labels to track resources, I wouldn't want to change code. It should be safe enough to truncate label values at 63 chars, right? |
truncating could lead to 2 resources having the same label, imagine the two resources only start differing from each other after char 63. Hashing would be an option, but this would make it non human readable.. |
I'll get to making it an annotation soon. Thanks for the input! :) |
thank you very much!! :) |
I know I said I'd do annotations, but for simplicity and a small technical detail, I went with a hash instead of the long label value. #170 |
works for me, thanks for the fast implementation! |
Creating a terraform CR with a name longer than 63 chars results in the operator crashing hard (not even crash loop backoff but recreation and immediate crash of the pod). The issue arises as the operator uses labels to track some information, but labels are limited to 63 chars vs metadata.name length may be 253 chars: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
The easiest way to get around this problem is to switch from labels to annotations as there the value can be almost arbitrarily long and only the key needs to follow these constraints: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
The text was updated successfully, but these errors were encountered: