From 2a2d2df93d7fe256312cb7f5e88647642f083804 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Thu, 26 Jan 2023 14:14:54 +0200 Subject: [PATCH] add comments --- library/common/1.0.0/templates/class/_configmap.tpl | 10 ++++++++++ library/common/1.0.0/templates/class/_secret.tpl | 13 ++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/library/common/1.0.0/templates/class/_configmap.tpl b/library/common/1.0.0/templates/class/_configmap.tpl index c1ba181113..1673fe7142 100644 --- a/library/common/1.0.0/templates/class/_configmap.tpl +++ b/library/common/1.0.0/templates/class/_configmap.tpl @@ -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 }} diff --git a/library/common/1.0.0/templates/class/_secret.tpl b/library/common/1.0.0/templates/class/_secret.tpl index 0dcc792035..d91d6f9a85 100644 --- a/library/common/1.0.0/templates/class/_secret.tpl +++ b/library/common/1.0.0/templates/class/_secret.tpl @@ -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 -}}