feat: allow common.metadata to be extended

This commit is contained in:
Chi-En Wu
2020-04-17 11:19:01 +08:00
parent 2d3734c769
commit 5fb7898e1b
9 changed files with 37 additions and 22 deletions

View File

@ -20,12 +20,15 @@ app.kubernetes.io/name: {{ include "common.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{ define "common.metadata.tpl" -}}
name: {{ include "common.fullname" . }}
labels:
{{- include "common.labels" . | nindent 2 -}}
{{- end -}}
{{- /*
Create a standard metadata header
*/ -}}
{{ define "common.metadata" -}}
metadata:
name: {{ include "common.fullname" . }}
labels:
{{- include "common.labels" . | nindent 4 -}}
{{- include "common.utils.flattenCall" (list "common.utils.merge" . "common.metadata.tpl") -}}
{{- end -}}