service.yaml 876 Bytes
Newer Older
Dominik Hebeler's avatar
Dominik Hebeler committed
1
{{- if .Values.service.enabled -}}
Dominik Hebeler's avatar
Dominik Hebeler committed
2
3
4
apiVersion: v1
kind: Service
metadata:
Dominik Hebeler's avatar
Dominik Hebeler committed
5
6
7
8
9
10
11
12
13
  name: {{ template "fullname" . }} 
  annotations:
{{- if .Values.service.annotations }}
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
{{- if .Values.prometheus.metrics }}
    prometheus.io/scrape: "true"
    prometheus.io/port: "{{ .Values.service.internalPort }}"
{{- end }}
Dominik Hebeler's avatar
Dominik Hebeler committed
14
  labels:
Dominik Hebeler's avatar
Dominik Hebeler committed
15
16
    track: "{{ .Values.application.track }}"
{{ include "sharedlabels" . | indent 4 }}
Dominik Hebeler's avatar
Dominik Hebeler committed
17
spec:
Dominik Hebeler's avatar
Dominik Hebeler committed
18
19
  type: {{ .Values.service.type }}
  externalTrafficPolicy: {{ .Values.service.trafficpolicy }}
Dominik Hebeler's avatar
Dominik Hebeler committed
20
  ports:
Dominik Hebeler's avatar
Dominik Hebeler committed
21
22
23
24
  - port: {{ .Values.service.externalPort }}
    targetPort: {{ .Values.service.internalPort }}
    protocol: TCP
    name: {{ .Values.service.name }}
Dominik Hebeler's avatar
Dominik Hebeler committed
25
  selector:
Dominik Hebeler's avatar
Dominik Hebeler committed
26
27
28
29
    app: {{ template "appname" . }}
    tier: "{{ .Values.application.tier }}"
    track: "{{ .Values.application.track }}"
{{- end -}}