aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-23 16:46:20 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-26 08:13:05 +0000
commitf6bf101bc307049f5341af8c58352a5cbf86d861 (patch)
tree62ba363844493507ce4461cc99e0b0bf4868a40d
parentf26caa523f2d6463fe7514157b82bda6acba4b06 (diff)
[COMMON] Add annotations to resource metadata tpl
Resource Metadata template can now have an optional "annotation" field in dict, which can be useful for post install job for example. Issue-ID: OOM-1971 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: Ib25ce4e09a7a51a35cf878e1c1198370e6dd2b20
-rw-r--r--kubernetes/common/common/templates/_labels.tpl5
1 files changed, 4 insertions, 1 deletions
diff --git a/kubernetes/common/common/templates/_labels.tpl b/kubernetes/common/common/templates/_labels.tpl
index 854019c197..66727629ef 100644
--- a/kubernetes/common/common/templates/_labels.tpl
+++ b/kubernetes/common/common/templates/_labels.tpl
@@ -63,10 +63,13 @@ app.kubernetes.io/instance: {{ include "common.release" $dot }}
{{- $dot := default . .dot -}}
{{- $suffix := default "" .suffix -}}
{{- $labels := default (dict) .labels -}}
-
+{{- $annotations := default (dict) .annotations -}}
name: {{ include "common.fullname" (dict "suffix" $suffix "dot" $dot )}}
namespace: {{ include "common.namespace" $dot }}
labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot ) | nindent 2 }}
+{{- if $annotations }}
+annotations: {{- include "common.tplValue" (dict "value" $annotations "context" $dot) | nindent 2}}
+{{- end -}}
{{- end -}}
{{/*