-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathservice.yaml
31 lines (30 loc) · 1.18 KB
/
service.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{{- $type := "svc" -}}
{{- $action := "common" -}}
{{- $Name := include "passbolt-library.fullname" . -}}
{{- $fullName := printf "%s-%s-%s" $Name $type $action -}}
apiVersion: v1
kind: Service
metadata:
# We make exception here to reduce the interservice naming
name: {{ $Name }}
labels:
{{- include "passbolt-library.labels" . | nindent 4 }}
{{- include "passbolt-library.selectorLabels" . | nindent 4 }}
{{- include "passbolt-library.typelabels" (dict "action" $action "type" $type) | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.ports.https.port | default 443 }}
targetPort: {{ .Values.service.ports.https.targetPort | default 443 }}
protocol: TCP
name: {{ .Values.service.ports.https.name | default "https" }}
- port: {{ .Values.service.ports.http.port | default 80 }}
targetPort: {{ .Values.service.ports.http.targetPort | default 80 }}
protocol: TCP
name: {{ .Values.service.ports.http.name | default "http" }}
selector:
{{- include "passbolt-library.selectorLabels" . | nindent 4 }}