Repository navigation
Cache secrets and concurrent decryption - #790
Conversation
- Caches decrypted secrets by original file path and returns decrypted results from memory
7273545 to
f51b1a1
Compare
|
I think we had a hacky workaround to use helm-secrets for decrypting environment secrets. Perhaps that's one of gotchas? Anyways, I'm fine with just sharing helmexec within and outside of scatterGather, if that works. |
mumoshu
left a comment
There was a problem hiding this comment.
I read helm.decryptedSecretMutex is for a wider and shorter lock, that is taken until we take a more granular and longer "per-secret" lock. And we now have a in-memory cache of decrypted files paired with mutex's for granular locking, in decryptedSecrets. This does seem to do what it states.
LGTM! Great job. I'm impressed by your work, @travisgroth 🎉 🙏
|
Thanks! Also, your read on the methodology is accurate. Should be least possible lock contention.
👍 i'm still poking around. I plan on doing some follow up PRs. |
Fixes issue introduced in #790: the order of secrets merged is not defined now, leading to unpredictable results in `helmfile apply`.
Related to #782 and #444
NB: This particular PR doesn't make all calls to secrets cached and concurrent. Environment Secrets in particular seem to not be evaluated with a ScatterGather(), and doesn't use the same helmexec instance as other parts of the code, so it doesn't take advantage of these changes. Some reworking of the plumbing there would be needed.