Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 considering 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?