2018-11-04 15:41:31 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: {{ template "deluge.fullname" . }}-gui
|
|
|
|
labels:
|
2018-11-07 04:04:25 +00:00
|
|
|
app.kubernetes.io/name: {{ include "deluge.name" . }}
|
|
|
|
helm.sh/chart: {{ include "deluge.chart" . }}
|
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
2018-11-04 15:41:31 +00:00
|
|
|
{{- if .Values.guiService.labels }}
|
|
|
|
{{ toYaml .Values.guiService.labels | indent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.guiService.annotations }}
|
|
|
|
annotations:
|
|
|
|
{{ toYaml . | indent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
{{- if (or (eq .Values.guiService.type "ClusterIP") (empty .Values.guiService.type)) }}
|
|
|
|
type: ClusterIP
|
|
|
|
{{- if .Values.guiService.clusterIP }}
|
|
|
|
clusterIP: {{ .Values.guiService.clusterIP }}
|
|
|
|
{{end}}
|
|
|
|
{{- else if eq .Values.guiService.type "LoadBalancer" }}
|
|
|
|
type: {{ .Values.guiService.type }}
|
|
|
|
{{- if .Values.guiService.loadBalancerIP }}
|
|
|
|
loadBalancerIP: {{ .Values.guiService.loadBalancerIP }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.guiService.loadBalancerSourceRanges }}
|
|
|
|
loadBalancerSourceRanges:
|
|
|
|
{{ toYaml .Values.guiService.loadBalancerSourceRanges | indent 4 }}
|
|
|
|
{{- end -}}
|
|
|
|
{{- else }}
|
|
|
|
type: {{ .Values.guiService.type }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.guiService.externalIPs }}
|
|
|
|
externalIPs:
|
|
|
|
{{ toYaml .Values.guiService.externalIPs | indent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.guiService.externalTrafficPolicy }}
|
|
|
|
externalTrafficPolicy: {{ .Values.guiService.externalTrafficPolicy }}
|
|
|
|
{{- end }}
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
port: {{ .Values.guiService.port }}
|
|
|
|
protocol: TCP
|
|
|
|
targetPort: http
|
|
|
|
{{ if (and (eq .Values.guiService.type "NodePort") (not (empty .Values.guiService.nodePort))) }}
|
|
|
|
nodePort: {{.Values.guiService.nodePort}}
|
|
|
|
{{ end }}
|
|
|
|
selector:
|
2018-11-07 04:04:25 +00:00
|
|
|
app.kubernetes.io/name: {{ include "deluge.name" . }}
|
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|