25 lines
809 B
YAML
25 lines
809 B
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.serviceAnnotations }}
|
|
annotations:
|
|
{{ toYaml .Values.ui.serviceAnnotations | indent 4}}{{- end }}
|
|
spec:
|
|
ports:
|
|
- port: {{ .Values.ui.servicePort }}
|
|
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.loadBalancerSourceRanges }}
|
|
loadBalancerSourceRanges:
|
|
{{ toYaml .Values.ui.loadBalancerSourceRanges | indent 4 }}{{- end }}
|
|
{{- end -}}
|