apiVersion: v1 kind: Service metadata: name: {{ template "application.fullname" . }} labels: app: {{ template "application.name" . }} chart: {{ template "application.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.port }} {{- if .Values.service.portName }} name: {{ .Values.service.portName }} {{- end }} targetPort: {{ .Values.deployment.containerPort }} protocol: TCP selector: app: {{ template "application.name" . }} release: {{ .Release.Name }}