mirror of
https://github.com/bitnami/charts.git
synced 2026-03-16 06:47:30 +08:00
* [bitnami/spark] Open up https if security.ssl.enabled - Bump spark chart from 5.8.x to 5.9.0 - Add https ports for statefulsets when SSL enabled - Set SPARK_WEBUI_SSL_PORT for downstream container - Add port to svc-master for https when enabled - Add spark-master-svc to TLS cert alternate names - Introduce new values.yaml params: - master.webPortHttps - worker.webPortHttps - service.nodePorts.webHttps Closes #8417. Closes #8446. Signed-off-by: Brad Solomon <81818815+brsolomon-deloitte@users.noreply.github.com> * Add documentation for new parameters around SSL/TLS/HTTPS - master.webPortHttps - worker.webPortHttps - service.nodePorts.webHttps - service.webPortHttps Signed-off-by: Brad Solomon <81818815+brsolomon-deloitte@users.noreply.github.com> * Avoid checking values in negative Signed-off-by: Brad Solomon <81818815+brsolomon-deloitte@users.noreply.github.com> * Resolve lint issue Signed-off-by: Brad Solomon <81818815+brsolomon-deloitte@users.noreply.github.com> * Avoid checking values in negative Signed-off-by: Brad Solomon <81818815+brsolomon-deloitte@users.noreply.github.com>
71 lines
3.0 KiB
YAML
71 lines
3.0 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
{{- if .Values.ingress.secrets }}
|
|
{{- range .Values.ingress.secrets }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ .name }}
|
|
namespace: {{ $.Release.Namespace }}
|
|
labels: {{- include "common.labels.standard" $ | nindent 4 }}
|
|
{{- if $.Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if $.Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
type: kubernetes.io/tls
|
|
data:
|
|
tls.crt: {{ .certificate | b64enc }}
|
|
tls.key: {{ .key | b64enc }}
|
|
---
|
|
{{- end }}
|
|
{{- else if and .Values.ingress.tls (not .Values.ingress.certManager) }}
|
|
{{- $ca := genCA "spark-ca" 365 }}
|
|
{{- $cert := genSignedCert .Values.ingress.hostname nil (list .Values.ingress.hostname) 365 $ca }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ printf "%s-tls" .Values.ingress.hostname }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
type: kubernetes.io/tls
|
|
data:
|
|
tls.crt: {{ $cert.Cert | b64enc | quote }}
|
|
tls.key: {{ $cert.Key | b64enc | quote }}
|
|
ca.crt: {{ $ca.Cert | b64enc | quote }}
|
|
---
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if (include "spark.createTlsSecret" . ) }}
|
|
{{- $ca := genCA "spark-internal-ca" 365 }}
|
|
{{- $releaseNamespace := .Release.Namespace }}
|
|
{{- $clusterDomain := .Values.clusterDomain }}
|
|
{{- $fullname := include "common.names.fullname" . }}
|
|
{{- $headlessServiceName := printf "%s-headless" ( include "common.names.fullname" . ) }}
|
|
{{- $masterServiceName := printf "%s" ( include "spark.master.service.name" . ) }}
|
|
{{- $altNames := list (printf "*.%s.%s.svc.%s" $masterServiceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $masterServiceName $releaseNamespace $clusterDomain) (printf "*.%s.%s.svc.%s" $headlessServiceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc.%s" $headlessServiceName $releaseNamespace $clusterDomain) $fullname }}
|
|
{{- $crt := genSignedCert $fullname nil $altNames 365 $ca }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ include "common.names.fullname" . }}-crt
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
type: kubernetes.io/tls
|
|
data:
|
|
ca.crt: {{ $ca.Cert | b64enc | quote }}
|
|
tls.crt: {{ $crt.Cert | b64enc | quote }}
|
|
tls.key: {{ $crt.Key | b64enc | quote }}
|
|
{{- end }}
|