| gio | c916187 | 2024-04-21 10:46:35 +0400 | [diff] [blame^] | 1 | --- |
| 2 | {{- if or .Values.service.enabled .Values.ingress.enabled }} |
| 3 | apiVersion: "v1" |
| 4 | kind: "Service" |
| 5 | metadata: |
| 6 | name: {{ include "common.names.fullname" . }} |
| 7 | labels: |
| 8 | {{- include "common.labels.standard" . | nindent 4 }} |
| 9 | spec: |
| 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 | ... |