34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
{{- if .Values.ui.enabled -}}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ .Release.Name }}-{{ .Values.ui.name }}
|
|
labels:
|
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
{{- if .Values.ui.serviceLabels }}
|
|
{{- toYaml .Values.ui.serviceLabels | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.ui.serviceAnnotations }}
|
|
annotations:
|
|
{{ toYaml .Values.ui.serviceAnnotations | indent 4}}{{- end }}
|
|
spec:
|
|
ports:
|
|
- port: {{ .Values.ui.servicePort }}
|
|
{{- if .Values.ui.servicePortName }}
|
|
name: {{ .Values.ui.servicePortName }}
|
|
{{- end }}
|
|
protocol: TCP
|
|
targetPort: 8001
|
|
selector:
|
|
app: {{ .Release.Name }}-{{ .Values.ui.name }}
|
|
sessionAffinity: None
|
|
type: {{ .Values.ui.serviceType }}
|
|
{{- if and (eq .Values.ui.serviceType "LoadBalancer") .Values.ui.loadBalancerIP }}
|
|
loadBalancerIP: {{ .Values.ui.loadBalancerIP | quote }}
|
|
{{- end }}
|
|
{{- if and (eq .Values.ui.serviceType "LoadBalancer") .Values.ui.loadBalancerSourceRanges }}
|
|
loadBalancerSourceRanges:
|
|
{{ toYaml .Values.ui.loadBalancerSourceRanges | indent 4 }}{{- end }}
|
|
{{- end -}}
|