Files
cloud-configuration/helm/template/templates/_service.yaml
T
2023-11-08 09:38:09 +01:00

26 lines
663 B
YAML

{{- define "template.service" -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "template.fullname" . }}
labels:
{{- include "template.labels" . | nindent 4 }}
annotations:
{{- include "template.annotations" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- name: http
protocol: TCP
port: {{ .Values.service.port }}
targetPort: http
{{- if .Values.application.isSpring }}
- name: http-actuator
protocol: TCP
port: {{ .Values.service.actuatorPort }}
targetPort: http-actuator
{{- end }}
selector:
{{- include "template.selectorLabels" . | nindent 4 }}
{{- end }}