From bae66c7c9ca6d194f26506018a87ce6e70b10024 Mon Sep 17 00:00:00 2001 From: Chi-En Wu Date: Wed, 22 Apr 2020 10:55:16 +0800 Subject: [PATCH] refactor: `common.pod-template` => `common.pod.template` --- templates/_cronjob.yaml | 2 +- templates/_deployment.yaml | 2 +- templates/_pod.tpl | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/_cronjob.yaml b/templates/_cronjob.yaml index f78cffc..4dc54a0 100644 --- a/templates/_cronjob.yaml +++ b/templates/_cronjob.yaml @@ -30,7 +30,7 @@ spec: {{ include "common.selectorLabels" $top | nindent 8 }} spec: 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 -}} {{- define "common.cronJob" -}} diff --git a/templates/_deployment.yaml b/templates/_deployment.yaml index bcc58a1..fcec8fc 100644 --- a/templates/_deployment.yaml +++ b/templates/_deployment.yaml @@ -16,7 +16,7 @@ spec: matchLabels: {{ include "common.selectorLabels" $top | nindent 6 }} template: - {{ include "common.pod-template" . | nindent 4 }} + {{ include "common.pod.template" . | nindent 4 }} {{- end -}} {{- define "common.deployment" -}} diff --git a/templates/_pod.tpl b/templates/_pod.tpl index 224b1e3..9f9c555 100644 --- a/templates/_pod.tpl +++ b/templates/_pod.tpl @@ -1,6 +1,6 @@ {{/* vim: set filetype=mustache: */}} -{{- define "common.pod-template.tpl" -}} +{{- define "common.pod.template.tpl" -}} {{- $top := first . -}} {{- $values := index . 1 -}} metadata: @@ -30,6 +30,6 @@ spec: {{- end }} {{- end -}} -{{- define "common.pod-template" -}} -{{- include "common.utils.merge" (append . "common.pod-template.tpl") -}} +{{- define "common.pod.template" -}} +{{- include "common.utils.merge" (append . "common.pod.template.tpl") -}} {{- end -}}