Closed onedr0p closed 3 months ago
We can't "shorten" the schematic ID, but you can re-encode it to fit into the limit of 63 characters if you want to.
As it's sha256
which is hex-encoded, the actual size is 32 bytes, so you could do e.g. base64(unhex(schematicID))
and it will use less characters.
That makes sense but unfortunately it wouldn't fit my use case as I use the schematic id defined in one place and it needs to cover being used in the factory URL as well as the node label. Would there be a way to have factory accept this shortened value you mentioned as an alias to the real value on the backend?
For anyone coming across this issue I've worked around this in my use-case by storing the first 32 characters in a part-0 label and the remaining 32 characters in a part-1 label.
Since both Flux and my local env uses drone/envsubst, I can do some len evaluations.
Would there be a way to have factory accept this shortened value you mentioned as an alias to the real value on the backend?
No.
But there will be other improvements to help with schematics. The machine schematic can be retrieved via talosctl get extensions
without the need to go ever into Kubernetes API.
Hi 👋🏼
I was trying to add the schematic ID to the node labels but the schematic ID is too long for Kubernetes, the current schematic ID length is 64 while kubernetes only allows for a length of 63.
This help with automation and determining which node has what schematic ID, it would be nice to reduce this ID length to something that can fit into a node label by changing the hashing algorithm.