-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathservice.yaml
27 lines (27 loc) · 989 Bytes
/
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
apiVersion: v1
kind: Service
metadata:
name: {{ include "testkube-api.fullname" . }}
labels:
{{- include "testkube-api.labels" . | nindent 4 }}
{{- if .Values.service.labels }}
{{- include "global.tplvalues.render" ( dict "value" .Values.service.labels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.global.labels }}
{{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.global.annotations }}
{{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
protocol: TCP
name: http
selector: {{- include "testkube-api.selectorLabels" . | nindent 4 }}