Files
charts/bitnami/cassandra/templates/cassandra-secret.yaml
Javier J. Salmerón-García a88fd0a9e3 [bitnami/cassandra] feat: 🔒 Enable networkPolicy (#23335)
* [bitnami/cassandra] feat: 🔒 Enable networkPolicy

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* fix: 🐛 Add missing parethesis in helper function

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>

---------

Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
2024-02-09 10:20:17 +01:00

40 lines
1.7 KiB
YAML

{{- /*
Copyright VMware, Inc.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if (not .Values.dbUser.existingSecret) -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ 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: Opaque
data:
cassandra-password: {{ include "cassandra.password" . | b64enc | quote }}
{{ end }}
{{- if and (or .Values.tls.keystorePassword .Values.tls.truststorePassword .Values.tls.autoGenerated) (not .Values.tls.passwordsSecret) (not .Values.tls.tlsEncryptionSecretName) }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-tls-pass" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
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: Opaque
data:
{{- if or .Values.tls.keystorePassword .Values.tls.autoGenerated }}
keystore-password: {{ include "cassandra.keystore.password" . | b64enc | quote }}
{{- end }}
{{- if or .Values.tls.truststorePassword .Values.tls.autoGenerated }}
truststore-password: {{ include "cassandra.truststore.password" . | b64enc | quote }}
{{- end }}
{{- end }}