Skip to content

Conversation

@SkalaNetworks
Copy link

@SkalaNetworks SkalaNetworks commented Oct 15, 2024

This pull request adds a new UUID function: uuidv5

UUIDv5 is different from the already implemented UUIDv4 functions because it is pseudo-random and deterministic.
It takes into input a "namespace", which we could call a seed of some sort. It then takes a "name" and outputs a UUID.

This feature is extremely useful for tools like Helm which depend on Sprig because of the determinism.
There are usecases where Helm Charts need to generate random IDs, but uuidv4 doesn't survive upgrades because they get regenerated.

Having one single manually generated source of randomness (the namespace) and then using it everywhere in templates by specifying different "names" makes the UUID generation random for each template but also deterministic (it will survive through upgrades).

Considering the amount of questions on stackoverflow involving idempotence for randomly generated values, I think this function would be pretty useful.

@mattfarina considering you're a Helm maintainer, do you have a particular opinion on this matter?

Signed-off-by: SkalaNetworks <[email protected]>
@SkalaNetworks
Copy link
Author

Hey @mattfarina, just paging you to know if you guys need help with maintaining this project? It's an elementary dependency of many projects and keeping it active would be beneficial for everybody. I see there was a lack of activity for almost 2 years until now, I can volunteer to keep it going.

@seddarj seddarj mentioned this pull request Apr 15, 2025
@SkalaNetworks
Copy link
Author

@mattfarina Hi, I'm sorry to insist but I think UUIDv5 would be great for stable randomness in a lot of Helm charts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant