drone-charts/templates/service.yaml

37 lines
1.2 KiB
YAML
Raw Normal View History

2021-07-21 20:17:38 +00:00
apiVersion: v1
kind: Service
metadata:
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
2021-07-21 20:17:38 +00:00
labels:
{{- include "drone.labels" . | nindent 4 }}
name: {{ include "drone.fullname" . }}
2021-07-21 20:17:38 +00:00
spec:
{{- with .Values.service.externalIPs }}
externalIPs:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- if .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
{{- end }}
{{- if and .Values.service.loadBalancerClass (eq .Values.service.type "LoadBalancer") }}
loadBalancerClass: {{ .Values.service.loadBalancerClass }}
{{- end }}
{{- if and .Values.service.loadBalancerIP (eq .Values.service.type "LoadBalancer") }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
{{- with .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{- toYaml . | nindent 2 }}
{{- end }}
2021-07-21 20:17:38 +00:00
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}
2021-07-21 20:17:38 +00:00
protocol: TCP
name: {{ .Values.service.name }}
2021-07-21 20:17:38 +00:00
selector:
{{- include "drone.selectorLabels" . | nindent 4 }}