mirror of
https://github.com/bitnami/charts.git
synced 2026-03-16 14:57:08 +08:00
* Update tls-secret.yaml Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com> * Update Chart.yaml Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com> * Update CHANGELOG.md Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com> --------- Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com> Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com> Co-authored-by: Bitnami Bot <bitnami.bot@broadcom.com>
36 lines
2.1 KiB
YAML
36 lines
2.1 KiB
YAML
{{- /*
|
|
Copyright Broadcom, Inc. All Rights Reserved.
|
|
SPDX-License-Identifier: APACHE-2.0
|
|
*/}}
|
|
|
|
{{- if and .Values.tls.enabled (not .Values.tls.existingSecret) }}
|
|
{{- $ca := genCA "nginx-ca" 365 }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ printf "%s-tls" (include "common.names.fullname" .) }}
|
|
namespace: {{ include "common.names.namespace" . | quote }}
|
|
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
type: kubernetes.io/tls
|
|
data:
|
|
{{- if .Values.tls.autoGenerated }}
|
|
{{- $cert := genSignedCert (include "common.names.fullname" .) nil (list (include "common.names.fullname" .) (printf "%s.%s" (include "common.names.fullname" .) (include "common.names.namespace" .)) (printf "%s.%s.svc" (include "common.names.fullname" .) (include "common.names.namespace" .)) (printf "%s.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" .) (default .Values.clusterDomain .Values.global.clusterDomain))) 365 $ca }}
|
|
{{ .Values.tls.certFilename }}: {{ include "common.secrets.lookup" (dict "secret" (printf "%s-tls" (include "common.names.fullname" .)) "key" .Values.tls.certFilename "defaultValue" $cert.Cert "context" $) }}
|
|
{{ .Values.tls.certKeyFilename }}: {{ include "common.secrets.lookup" (dict "secret" (printf "%s-tls" (include "common.names.fullname" .)) "key" .Values.tls.certKeyFilename "defaultValue" $cert.Key "context" $) }}
|
|
{{ .Values.tls.certCAFilename }}: {{ include "common.secrets.lookup" (dict "secret" (printf "%s-tls" (include "common.names.fullname" .)) "key" .Values.tls.certCAFilename "defaultValue" $ca.Cert "context" $) }}
|
|
{{- else }}
|
|
{{- if .Values.tls.cert }}
|
|
{{ .Values.tls.certFilename }}: {{ .Values.tls.cert | b64enc }}
|
|
{{- end }}
|
|
{{- if .Values.tls.key }}
|
|
{{ .Values.tls.certKeyFilename }}: {{ .Values.tls.key | b64enc }}
|
|
{{- end }}
|
|
{{- if .Values.tls.ca }}
|
|
{{ .Values.tls.certCAFilename }}: {{ .Values.tls.ca | b64enc }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|