From 048626874b096d515e2bc872724538cb487805f7 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 07:57:50 +0000 Subject: [PATCH] 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` instead of just ``. 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. --- charts/iperf3-monitor/templates/exporter-controller.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/iperf3-monitor/templates/exporter-controller.yaml b/charts/iperf3-monitor/templates/exporter-controller.yaml index dffa5b1..e34acd7 100644 --- a/charts/iperf3-monitor/templates/exporter-controller.yaml +++ b/charts/iperf3-monitor/templates/exporter-controller.yaml @@ -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 -}}