diff --git a/Chart.yaml b/Chart.yaml index 8c07a72..9b6a2b4 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v2 name: chart_template description: chart_description -version: 0.0.4 \ No newline at end of file +version: 0.0.5 \ No newline at end of file diff --git a/templates/helm.yaml b/templates/helm.yaml index cec5d09..81628d9 100644 --- a/templates/helm.yaml +++ b/templates/helm.yaml @@ -1,6 +1,8 @@ +{{ $name := .Values.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.name }} +{{- $repository = "" }} {{- end }} apiVersion: helm.cattle.io/v1 kind: HelmChart @@ -8,8 +10,10 @@ metadata: name: {{ .Values.name }} namespace: {{ .Values.namespace }} spec: - chart: {{ .Values.name }} + chart: {{ $name }} +{{- if $repository }} repo: {{ $repository }} +{{- end }} targetNamespace: {{ .Values.namespace }} version: {{ .Values.subchartData.version }} valuesContent: |-