Merge "[COMMON] Add annotations to resource metadata tpl"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Thu, 26 Mar 2020 19:40:34 +0000 (19:40 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 26 Mar 2020 19:40:34 +0000 (19:40 +0000)
kubernetes/common/common/templates/_labels.tpl

index 854019c..6672762 100644 (file)
@@ -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 -}}
 
 {{/*