Hello! I'm running into a challenge with using pan...
# general
l
Hello! I'm running into a challenge with using pants to package helm charts. I deploy my Helm charts via ArgoCD, which means I don't use
helm_deployment
, ArgoCD handles the deployment directly from the packaged chart. The problem is that I want to inject Docker image addresses into the chart's
values.yaml
at package time, so the packaged chart has the correct image refs baked in.
helm_deployment
already has a way to do this at deploy time, it can resolve
docker_image
target addresses to their actual image references (e.g.
<http://myregistry.io/app:abc123|myregistry.io/app:abc123>
). I was thinking about adding similar functionality to
helm_chart
, a
values
field that gets injected into
values.yaml
when packaging. Values pointing to
docker_image
targets would be resolved to their full image refs; plain string values would be written as-is.
Copy code
# src/helm/helloworld/BUILD
helm_chart(
  values={
    "image": "src/docker/helloworld:helloworld",
    "sidecar.image": "src/docker/sidecar:sidecar",
    "replicas": "3",
  },
)
This way,
pants package
produces a chart with the correct image tags baked into the defaults. Is this a bad idea, or would a change like this be welcome? Happy to put up a PR.