Merge pull request 'helm-implementation' (#1) from helm-implementation into main

Reviewed-on: ties/chart_template#1
This commit is contained in:
ties 2024-08-29 09:06:41 +00:00
commit 462ae64b0f
2 changed files with 16 additions and 0 deletions

16
templates/helm.yaml Normal file
View File

@ -0,0 +1,16 @@
{{ $repository := .Values.subchartData.repository }}
{{- if hasPrefix "oci://" .Values.subchartData.repository }}
{{- $repository = printf "%s/%s" .Values.subchartData.repository .Chart.Name }}
{{- end }}
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: {{ .Chart.Name }}
namespace: {{ .Values.namespace }}
spec:
chart: {{ .Chart.Name }}
repo: {{ $repository }}
targetNamespace: {{ .namespace }}
version: {{ .Values.subchartData.version }}
valuesContent: |-
{{ toYaml .Values.global | indent 4 }}