blob: ac23b71747255cfcffdee673972eb12f9242b73b [file] [log] [blame]
gioc9161872024-04-21 10:46:35 +04001---
2{{- if or .Values.service.enabled .Values.ingress.enabled }}
3apiVersion: "v1"
4kind: "Service"
5metadata:
6 name: {{ include "common.names.fullname" . }}
7 labels:
8 {{- include "common.labels.standard" . | nindent 4 }}
9spec:
10 type: {{ .Values.service.type }}
11 {{- if .Values.service.sessionAffinity.enabled }}
12 sessionAffinity: "ClientIP"
13 sessionAffinityConfig:
14 clientIP:
15 timeoutSeconds: {{ .Values.service.sessionAffinity.timeoutSeconds }}
16 {{- end }}
17 ports:
18 {{- range $key, $value := .Values.service.ports }}
19 - port: {{ $value.port }}
20 targetPort: {{ $key }}
21 protocol: {{ $value.protocol }}
22 name: {{ $key }}
23 {{- if and (eq $.Values.service.type "NodePort") $value.nodePort }}
24 nodePort: {{ $value.nodePort }}
25 {{- end }}
26 {{- end }}
27 selector:
28 {{- include "common.labels.matchLabels" . | nindent 4 }}
29 openproject/process: web
30{{- end }}
31...