add comments

This commit is contained in:
Stavros kois
2023-01-26 14:14:54 +02:00
parent 564115d7bf
commit 2a2d2df93d
2 changed files with 22 additions and 1 deletions

View File

@@ -1,3 +1,13 @@
{{/*
Call this template like this;
{{- include "ix.v1.common.class.configmap" (dict "root" $root "values" $values) -}}
$values contains:
name: string
labels: dict
annotations: dict
contentType: yaml (only supported type)
data: (data | toYaml)
*/}}
{{- define "ix.v1.common.class.configmap" -}}
{{- $values := .values -}}
{{- $root := .root }}

View File

@@ -1,3 +1,14 @@
{{/*
Call this template like this;
{{- include "ix.v1.common.class.configmap" (dict "root" $root "values" $values) -}}
$values contains:
name: string
labels: dict
annotations: dict
contentType: yaml | certificate | pullSecret
data: dict or (data | toYaml) when contentType is yaml
secretType: custom secret type (optional)
*/}}
{{- define "ix.v1.common.class.secret" -}}
{{- $values := .values -}}
{{- $root := .root -}}
@@ -41,6 +52,6 @@ data:
stringData:
{{- $values.data | nindent 2 }}
{{- else -}}
{{- fail (printf "Invalid content type (%s) for secret. Valid types are pullSecret, certificate, scalar and key_value" $values.contentType) -}}
{{- fail (printf "Invalid content type (%s) for secret. Valid types are pullSecret, certificate, yaml" $values.contentType) -}}
{{- end -}}
{{- end -}}