I've devised below way for managing helm chart dependencies in the context of CI/CD pipelines and not sure it's correct.
charts should be in .gitignorehelm repo add for each dependency helm repohelm dependency build to download dependencies to charts folder according to lock file.helm package in order to include charts folder in the built chart during release phase. Built chart will be promoted to higher environments and pipelines as is with its dependencies (no dependency updates will be performed there).What's the industry standard way for managing dependencies of a helm chart (should they be ignored in .gitignore?)
In general, binary dependencies should not be committed to git if they can easily be downloaded in a reproducible way. Also, if you look at some of the popular charts, for example the bitnami charts, they do indeed ignore chart dependencies. Similarly the kube-prometheus-stack also ignores the charts subdirectories. So I think it's safe to say that this is a best practice.
With that said, most chart dependency tarballs tend to be pretty small, so IMHO as long as they are not constantly being updated, it's probably fine to add them to git if it makes the build/deploy process simpler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With