refactor: common.pod-template => common.pod.template

This commit is contained in:
Chi-En Wu
2020-04-22 10:55:16 +08:00
parent 96ba1fecbb
commit bae66c7c9c
3 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@ spec:
{{ include "common.selectorLabels" $top | nindent 8 }} {{ include "common.selectorLabels" $top | nindent 8 }}
spec: spec:
template: template:
{{ include "common.pod-template" (list $top $pod "common.cronJob.pod") | nindent 8 }} {{ include "common.pod.template" (list $top $pod "common.cronJob.pod") | nindent 8 }}
{{- end -}} {{- end -}}
{{- define "common.cronJob" -}} {{- define "common.cronJob" -}}

View File

@ -16,7 +16,7 @@ spec:
matchLabels: matchLabels:
{{ include "common.selectorLabels" $top | nindent 6 }} {{ include "common.selectorLabels" $top | nindent 6 }}
template: template:
{{ include "common.pod-template" . | nindent 4 }} {{ include "common.pod.template" . | nindent 4 }}
{{- end -}} {{- end -}}
{{- define "common.deployment" -}} {{- define "common.deployment" -}}

View File

@ -1,6 +1,6 @@
{{/* vim: set filetype=mustache: */}} {{/* vim: set filetype=mustache: */}}
{{- define "common.pod-template.tpl" -}} {{- define "common.pod.template.tpl" -}}
{{- $top := first . -}} {{- $top := first . -}}
{{- $values := index . 1 -}} {{- $values := index . 1 -}}
metadata: metadata:
@ -30,6 +30,6 @@ spec:
{{- end }} {{- end }}
{{- end -}} {{- end -}}
{{- define "common.pod-template" -}} {{- define "common.pod.template" -}}
{{- include "common.utils.merge" (append . "common.pod-template.tpl") -}} {{- include "common.utils.merge" (append . "common.pod.template.tpl") -}}
{{- end -}} {{- end -}}