Update templates/helm.yaml

This commit is contained in:
ties 2024-08-29 15:35:05 +00:00
parent 8fccf9544e
commit 388c89c8e7

View File

@ -1,6 +1,8 @@
{{ $name := .Values.subchartData.name }}
{{ $repository := .Values.subchartData.repository }} {{ $repository := .Values.subchartData.repository }}
{{- if hasPrefix "oci://" .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 }} {{- end }}
apiVersion: helm.cattle.io/v1 apiVersion: helm.cattle.io/v1
kind: HelmChart kind: HelmChart
@ -9,7 +11,9 @@ metadata:
namespace: {{ .Values.namespace }} namespace: {{ .Values.namespace }}
spec: spec:
chart: {{ .Values.name }} chart: {{ .Values.name }}
{{- if $repository }}
repo: {{ $repository }} repo: {{ $repository }}
{{- end }}
targetNamespace: {{ .Values.namespace }} targetNamespace: {{ .Values.namespace }}
version: {{ .Values.subchartData.version }} version: {{ .Values.subchartData.version }}
valuesContent: |- valuesContent: |-