feat: add template common.container

This commit is contained in:
Chi-En Wu
2020-04-15 16:02:35 +08:00
parent 66727cc7cb
commit ca615dee81
2 changed files with 49 additions and 0 deletions

15
templates/_container.yaml Normal file
View File

@ -0,0 +1,15 @@
{{/* vim: set filetype=mustache: */}}
{{- define "common.container.tpl" -}}
name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 4 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 4 }}
{{- end -}}
{{- define "common.container" -}}
{{- include "common.utils.flattenCall" (list "common.utils.merge" . "common.container.tpl") -}}
{{- end -}}