2021-07-21 20:17:38 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2022-04-19 09:51:34 +00:00
|
|
|
{{- with .Values.service.annotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
2021-07-21 20:17:38 +00:00
|
|
|
labels:
|
|
|
|
{{- include "drone.labels" . | nindent 4 }}
|
2022-04-19 09:51:34 +00:00
|
|
|
name: {{ include "drone.fullname" . }}
|
2021-07-21 20:17:38 +00:00
|
|
|
spec:
|
2022-04-21 20:58:41 +00:00
|
|
|
{{- 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 }}
|
2022-04-21 20:37:56 +00:00
|
|
|
targetPort: {{ .Values.config.DRONE_SERVER_PROTO | default "http" }}
|
2021-07-21 20:17:38 +00:00
|
|
|
protocol: TCP
|
2022-04-21 20:37:56 +00:00
|
|
|
name: {{ .Values.config.DRONE_SERVER_PROTO | default "http" }}
|
2021-07-21 20:17:38 +00:00
|
|
|
selector:
|
|
|
|
{{- include "drone.selectorLabels" . | nindent 4 }}
|