[FEATURE]: Helm Deploy Pre-processing
Feature Request
Background / Motivation
We're not sure how to track deploys with garden via helm using helm history
What should the user be able to do?
We'd like to see support for setting the appVersion field in a Helm Chart.yaml on garden deploy <service> and possibly garden dev.
Helm itself makes this more difficult due to https://github.com/helm/helm/issues/8194
It would be nice to be able to customize the garden deploy / garden dev steps to support a pre-processing step to use yq for example to dynamically set appVersion.
Why do they want to do this? What problem does it solve?
This would make helm history useful for keeping track of versions.
Suggested Implementation(s)
This is what it would sort of look like if deploy was customized as a workflow:
(modified from the example at https://docs.garden.io/using-garden/workflows#authenticate-with-google-cloud-before-deploying-a-project)
kind: Workflow
name: deploy
steps:
- script: |
export CHART_VERSION="$(date +%Y.%m.%d-%H:%M:%S,%N)"
export APP_VERSION="$(git rev-parse head)"
yq m -x "${SERVICE}/Helm/Chart.yaml.tmpl" \
<(echo "{\"version\": \"${CHART_VERSION}\", \"appVersion\": \"${APP_VERSION}\"}") \
>"${SERVICE}/Helm/Chart.yaml"
- name: deploy
command: [deploy]
How important is this feature for you/your team?
🌹 It’s a nice to have, but nice things are nice 🙂
Thanks, @oldsj! Would you be interested in implementing this feature? We are happy to support you and provide you with guidance. We can try to implement it ourselves, but we can't give any promises on the ETA.
This issue has been automatically marked as stale because it hasn't had any activity in 90 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Garden a better product!
Closing as stale. If it's still an issue in 0.13, please open a new one.