asset-relocation-tool-for-kubernetes
asset-relocation-tool-for-kubernetes copied to clipboard
Does not work for charts with image tags that default to Chart.AppVersion
I'm seeing more and more Helm charts that leave the tag
field empty in favor of defaulting to the AppVersion field of the chart.
A few examples:
image:
# -- Grafana Agent image registry (defaults to docker.io)
registry: "docker.io"
# -- Grafana Agent image repository.
repository: grafana/agent
# -- (string) Grafana Agent image tag. When empty, the Chart's appVersion is
# used.
tag: null
When I run relok8s with the following hints file (I'm using Grafana Agent as a subchart):
---
- "{{ .grafana-agent.image.registry }}/{{ .grafana-agent.image.repository }}:{{ .grafana-agent.image.tag }}"
I get this result:
% relok8s chart move -i hints.yaml --registry registry.exampke.com mychart.tgz
Chart provided
Computing relocation...
Error: failed to pull original images: failed to parse image reference: could not parse reference: docker.io/grafana/agent:<no value>