fix: Add 'v' prefix to default image tag for exporter
Updated the logic in `charts/iperf3-monitor/templates/exporter-controller.yaml` to ensure that when the exporter's image tag is not specified in `values.yaml`, it defaults to `v<Chart.AppVersion>` instead of just `<Chart.AppVersion>`. This change ensures the default tag matches image tagging conventions where a 'v' prefix is used for versions (e.g., `v0.1.0`). If an image tag is explicitly provided in `values.yaml`, that tag is used directly without modification. Verified with `helm template` for both default and custom tag scenarios.jules/align-helm-release-workflow
parent
b92c518b90
commit
048626874b
|
|
@ -77,7 +77,7 @@ Proceed with modifications only if the exporter controller is defined.
|
|||
{{- if $exporterContainerCfg -}}
|
||||
{{- if not $exporterContainerCfg.image.tag -}}
|
||||
{{- if $chart.AppVersion -}}
|
||||
{{- $_ := set $exporterContainerCfg.image "tag" $chart.AppVersion -}}
|
||||
{{- $_ := set $exporterContainerCfg.image "tag" (printf "v%s" $chart.AppVersion) -}}
|
||||
{{- else -}}
|
||||
{{- fail (printf "Error: Container image tag is not specified for controller '%s', container '%s', and Chart.AppVersion is also empty." $exporterControllerKey "exporter") -}}
|
||||
{{- end -}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue