Closed lallinger-tech closed 6 months ago
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'll get to making it an annotation soon. Thanks for the input! :)
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