mirror of
https://github.com/bitnami/charts.git
synced 2026-03-15 06:47:24 +08:00
* added https port settings when ssl is enabled * added https port settings when ssl is enabled
46 lines
1.8 KiB
YAML
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
|