feat: add template common.service

This commit is contained in:
Chi-En Wu
2020-04-15 16:05:36 +08:00
parent a77ef4878e
commit 6d1a271b44

20
templates/_service.yaml Normal file
View File

@ -0,0 +1,20 @@
{{/* vim: set filetype=mustache: */}}
{{- define "common.service.tpl" -}}
apiVersion: v1
kind: Service
{{ include "common.metadata" . }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "common.selectorLabels" . | nindent 4 }}
{{- end -}}
{{- define "common.service" -}}
{{- include "common.utils.flattenCall" (list "common.utils.merge" . "common.service.tpl") -}}
{{- end -}}