Files
deprecated-helm-charts/stable/selenium/templates/hub-service.yaml
T
Kirmayer Elad 0167114d90 [stable/selenium] - Adding the option to set nodePort on the service (#11956)
* stable/selenium - Adding the option to set nodePort on the service

Signed-off-by: Elad Kirmayer <ekirmayer@hotmail.com>

* Bumping chart version

Signed-off-by: Elad Kirmayer <ekirmayer@hotmail.com>

* Add checking if the serviceType is NodePort

Signed-off-by: Elad Kirmayer <ekirmayer@hotmail.com>

* Fix files convention

Signed-off-by: Elad Kirmayer <ekirmayer@hotmail.com>
2019-03-17 13:35:10 -07:00

33 lines
1.1 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ template "selenium.hub.fullname" . }}
labels:
app: {{ template "selenium.hub.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- if .Values.hub.serviceAnnotations }}
annotations:
{{ toYaml .Values.hub.serviceAnnotations | indent 4 }}
{{- end }}
spec:
type: {{ .Values.hub.serviceType | quote }}
{{- if .Values.hub.serviceLoadBalancerIP }}
loadBalancerIP: {{ .Values.hub.serviceLoadBalancerIP | quote }}
{{- end }}
{{- if .Values.hub.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.hub.loadBalancerSourceRanges | indent 4 }}
{{- end }}
sessionAffinity: {{ .Values.hub.serviceSessionAffinity | quote }}
ports:
- name: hub
port: {{ .Values.hub.servicePort }}
targetPort: {{ .Values.hub.port }}
{{- if and ( eq .Values.hub.serviceType "NodePort") .Values.hub.nodePort }}
nodePort: {{ .Values.hub.nodePort }}
{{- end }}
selector:
app: {{ template "selenium.hub.fullname" . }}