From 718a4ad732d19ef0eee1961f5957d5ecd9c04ed6 Mon Sep 17 00:00:00 2001 From: Dimitri Koshkin Date: Wed, 10 Apr 2024 12:39:37 -0700 Subject: [PATCH] refactor: template NFD image with .Chart.Version --- .../templates/nfd/manifests/helm-addon-installation.yaml | 2 ++ pkg/handlers/generic/lifecycle/nfd/strategy_helmaddon.go | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/charts/cluster-api-runtime-extensions-nutanix/templates/nfd/manifests/helm-addon-installation.yaml b/charts/cluster-api-runtime-extensions-nutanix/templates/nfd/manifests/helm-addon-installation.yaml index 6f3cc6859..8163657cf 100644 --- a/charts/cluster-api-runtime-extensions-nutanix/templates/nfd/manifests/helm-addon-installation.yaml +++ b/charts/cluster-api-runtime-extensions-nutanix/templates/nfd/manifests/helm-addon-installation.yaml @@ -8,6 +8,8 @@ metadata: name: '{{ .Values.hooks.nfd.helmAddonStrategy.defaultValueTemplateConfigMap.name }}' data: values.yaml: |- + image: + tag: v{{ .Chart.Version }}-minimal master: extraLabelNs: - nvidia.com diff --git a/pkg/handlers/generic/lifecycle/nfd/strategy_helmaddon.go b/pkg/handlers/generic/lifecycle/nfd/strategy_helmaddon.go index 622ebb4e2..b24e7faac 100644 --- a/pkg/handlers/generic/lifecycle/nfd/strategy_helmaddon.go +++ b/pkg/handlers/generic/lifecycle/nfd/strategy_helmaddon.go @@ -61,12 +61,6 @@ func (s helmAddonStrategy) apply( ) } - values := valuesTemplateConfigMap.Data["values.yaml"] - values += fmt.Sprintf(` -image: - tag: v%s-minimal -`, s.helmChart.Version) - hcp := &caaphv1.HelmChartProxy{ TypeMeta: metav1.TypeMeta{ APIVersion: caaphv1.GroupVersion.String(),