blob: 01030b447bbca73588c9c76e7b0174c542909ad0 [file] [log] [blame]
Giorgi Lekveishvili285ab622023-11-22 13:50:45 +04001apiVersion: v1
2kind: Service
3metadata:
4 name: {{ .Release.Name }}-gerrit-replica-service
5 labels:
6 app.kubernetes.io/component: gerrit-replica
7 app.kubernetes.io/instance: {{ .Release.Name }}
8 chart: {{ template "gerrit-replica.chart" . }}
9 heritage: {{ .Release.Service }}
10 release: {{ .Release.Name }}
11 {{- if .Values.additionalLabels }}
12{{ toYaml .Values.additionalLabels | indent 4 }}
13 {{- end }}
14 {{- if .Values.gerritReplica.service.additionalAnnotations }}
15 annotations:
16{{ toYaml .Values.gerritReplica.service.additionalAnnotations | indent 4 }}
17 {{- end }}
18spec:
19 {{ with .Values.gerritReplica.service }}
20 {{- if .loadBalancerSourceRanges -}}
21 loadBalancerSourceRanges:
22{{- range .loadBalancerSourceRanges }}
23 - {{ . | quote }}
24{{- end }}
25 {{- end }}
26 ports:
27 - name: http
28 port: {{ .http.port }}
29 targetPort: 8080
30 {{ if .ssh.enabled -}}
31 - name: ssh
32 port: {{ .ssh.port }}
33 targetPort: 29418
34 {{- end }}
35 type: {{ .type }}
36 externalTrafficPolicy: {{ .externalTrafficPolicy }}
37 {{- end }}
38 selector:
39 app.kubernetes.io/component: gerrit-replica
40 app.kubernetes.io/instance: {{ .Release.Name }}