https://pantsbuild.org/ logo
#general
Title
# general
r

rhythmic-battery-45198

06/21/2022, 4:30 PM
Hi All (CC: @witty-family-13337): Question related to the new helm backend: > 🧵
I just integrated
helm_chart
targets with my repo. First of all, Great job 🎉! I was able to replace a bunch of one-off scripts. Any advice on templatizing or otherwise injecting some values into chart sources? I am specifically thinking of the version fields in
Chart.yaml
and a default image version field in
values.yaml
. We would like to set these values during the release process rather than handle it in source code. A similar idea to using
DOCKER_TAG=<our release tag> ./pants publish src/docker::
in conjunction with
docker.build_args
for injecting the docker tag. A gradle helm plugin I have used in the past allowed templatizing in
Chart.yaml
.. something like
version: ${VERSION}
. Is this something that has been considered? Within the current version of pants, maybe I can create an
experimental_shell_command
target to run
sed
against a
Chart.yaml.template
and configure
helm_chart
sources
to include the output?
w

witty-family-13337

06/21/2022, 4:43 PM
glad to hear you find the plugin useful!
❤️ 1
Regarding support for interpolation in Chart.yaml, I haven't given it too much thought to be honest. It's defo a possibility. An alternative that we have been using in my company is having a
version
field in the target that would override any version value in the Chart.yaml. It works but it's a bit heavy-handed so I wasn't sure on including it in the first release.
interpolation in values is possible but the way the Docker backend does it is very specific to that backend, may this be a good reason to start to generalize it…? /cc @curved-television-6568
in the meantime, it looks like your workaround could give you that until a better approach
r

rhythmic-battery-45198

06/21/2022, 5:02 PM
Great - thanks for the info! appreciate it
c

curved-television-6568

06/21/2022, 5:33 PM
regarding refactoring out the value interpolation support, that could definitely be a good enough reason for it, yea
👍 2
5 Views