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 }}
{{- 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: |-