From 388c89c8e79aa6b17632599d0ebb4923b806ac85 Mon Sep 17 00:00:00 2001 From: ties Date: Thu, 29 Aug 2024 15:35:05 +0000 Subject: [PATCH] Update templates/helm.yaml --- templates/helm.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/helm.yaml b/templates/helm.yaml index cec5d09..790b5e7 100644 --- a/templates/helm.yaml +++ b/templates/helm.yaml @@ -1,6 +1,8 @@ +{{ $name := .Values.subchartData.name }} {{ $repository := .Values.subchartData.repository }} {{- if hasPrefix "oci://" .Values.subchartData.repository }} -{{- $repository = printf "%s/%s" .Values.subchartData.repository .Values.name }} +{{- $name = printf "%s/%s" .Values.subchartData.repository .Values.subchartData.name }} +{{- $repository = "" }} {{- end }} apiVersion: helm.cattle.io/v1 kind: HelmChart @@ -9,7 +11,9 @@ metadata: namespace: {{ .Values.namespace }} spec: chart: {{ .Values.name }} +{{- if $repository }} repo: {{ $repository }} +{{- end }} targetNamespace: {{ .Values.namespace }} version: {{ .Values.subchartData.version }} valuesContent: |-