Files
charts/bitnami/spark/templates/svc-master.yaml
ksarvani 0e188988e8 bitnami/spark: updated svc-master and master statefulset to expose https port when ssl is enabled. (#8608)
* added https port settings when ssl is enabled

* added https port settings when ssl is enabled
2022-01-10 12:41:13 +01:00

46 lines
1.8 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ include "spark.master.service.name" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- port: {{ .Values.service.clusterPort }}
targetPort: cluster
name: cluster
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.cluster)) }}
nodePort: {{ .Values.service.nodePorts.cluster }}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
- port: {{ .Values.service.webPort }}
{{- if .Values.security.ssl.enabled }}
targetPort: https
name: https
{{- else }}
targetPort: http
name: http
{{- end }}
protocol: TCP
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.web)) }}
nodePort: {{ .Values.service.nodePorts.web }}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: master