[bitnami/cassandra] Add support for usePasswordFiles (#32080)

* [bitnami/cassandra] Add support for `usePasswordFiles`

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>

* Update CHANGELOG.md

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

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

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

---------

Signed-off-by: Miguel Ruiz <miguel.ruiz@broadcom.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Miguel Ruiz
2025-02-27 11:11:52 +01:00
committed by GitHub
co-authored by Bitnami Containers
parent a3059b7e78
commit 0485a17a5c
5 changed files with 60 additions and 7 deletions
+7 -2
View File
@@ -1,8 +1,13 @@
# Changelog
## 12.1.4 (2025-02-19)
## 12.2.0 (2025-02-20)
* [bitnami/cassandra] Release 12.1.4 ([#31975](https://github.com/bitnami/charts/pull/31975))
* [bitnami/cassandra] Add support for `usePasswordFiles` ([#32080](https://github.com/bitnami/charts/pull/32080))
## <small>12.1.4 (2025-02-19)</small>
* [bitnami/*] Use CDN url for the Bitnami Application Icons (#31881) ([d9bb11a](https://github.com/bitnami/charts/commit/d9bb11a9076b9bfdcc70ea022c25ef50e9713657)), closes [#31881](https://github.com/bitnami/charts/issues/31881)
* [bitnami/cassandra] Release 12.1.4 (#31975) ([93617a2](https://github.com/bitnami/charts/commit/93617a28affb1ab251083cc52c9ec61c76ba647e)), closes [#31975](https://github.com/bitnami/charts/issues/31975)
## <small>12.1.3 (2025-02-04)</small>
+1 -1
View File
@@ -32,4 +32,4 @@ maintainers:
name: cassandra
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/cassandra
version: 12.1.4
version: 12.2.0
+1
View File
@@ -188,6 +188,7 @@ As the image run as non-root by default, it is necessary to adjust the ownership
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
| `usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` |
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` |
| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` |
+48 -4
View File
@@ -186,19 +186,29 @@ spec:
apiVersion: v1
fieldPath: metadata.name
{{- if or .Values.tls.passwordsSecret .Values.tls.tlsEncryptionSecretName .Values.tls.truststorePassword .Values.tls.autoGenerated }}
{{- if .Values.usePasswordFiles }}
- name: CASSANDRA_TRUSTSTORE_PASSWORD_FILE
value: "/opt/bitnami/cassandra/secrets/truststore-password"
{{- else }}
- name: CASSANDRA_TRUSTSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ (include "cassandra.tlsPasswordsSecret" .) }}
name: {{ include "cassandra.tlsPasswordsSecret" . }}
key: truststore-password
{{- end }}
{{- end }}
{{- if or .Values.tls.passwordsSecret .Values.tls.tlsEncryptionSecretName .Values.tls.keystorePassword .Values.tls.autoGenerated }}
{{- if .Values.usePasswordFiles }}
- name: CASSANDRA_KEYSTORE_PASSWORD_FILE
value: "/opt/bitnami/cassandra/secrets/keystore-password"
{{- else }}
- name: CASSANDRA_KEYSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ (include "cassandra.tlsPasswordsSecret" .) }}
name: {{ include "cassandra.tlsPasswordsSecret" . }}
key: keystore-password
{{- end }}
{{- end }}
{{- if .Values.tls.resources }}
resources: {{- toYaml .Values.tls.resources | nindent 12 }}
{{- else if ne .Values.tls.resourcesPreset "none" }}
@@ -212,6 +222,10 @@ spec:
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
{{- if .Values.usePasswordFiles }}
- name: cassandra-secrets
mountPath: /opt/bitnami/cassandra/secrets
{{- end }}
{{- end }}
{{- if .Values.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
@@ -257,11 +271,16 @@ spec:
value: {{ .Values.cluster.name }}
- name: CASSANDRA_SEEDS
value: {{ (include "cassandra.seeds" .) | quote }}
{{- if .Values.usePasswordFiles }}
- name: CASSANDRA_PASSWORD_FILE
value: {{ printf "/opt/bitnami/cassandra/secrets/%s" (include "common.secrets.key" (dict "existingSecret" .Values.dbUser.existingSecret "key" "cassandra-password")) }}
{{- else }}
- name: CASSANDRA_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "common.secrets.name" (dict "existingSecret" .Values.dbUser.existingSecret "context" $) }}
key: {{ include "common.secrets.key" (dict "existingSecret" .Values.dbUser.existingSecret "key" "cassandra-password") }}
{{- end }}
- name: POD_IP
valueFrom:
fieldRef:
@@ -291,19 +310,29 @@ spec:
value: "true"
{{- end }}
{{- if or .Values.tls.passwordsSecret .Values.tls.tlsEncryptionSecretName .Values.tls.truststorePassword .Values.tls.autoGenerated }}
{{- if .Values.usePasswordFiles }}
- name: CASSANDRA_TRUSTSTORE_PASSWORD_FILE
value: "/opt/bitnami/cassandra/secrets/truststore-password"
{{- else }}
- name: CASSANDRA_TRUSTSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ (include "cassandra.tlsPasswordsSecret" .) }}
name: {{ include "cassandra.tlsPasswordsSecret" . }}
key: truststore-password
{{- end }}
{{- end }}
{{- if or .Values.tls.passwordsSecret .Values.tls.tlsEncryptionSecretName .Values.tls.keystorePassword .Values.tls.autoGenerated }}
{{- if .Values.usePasswordFiles }}
- name: CASSANDRA_KEYSTORE_PASSWORD_FILE
value: "/opt/bitnami/cassandra/secrets/keystore-password"
{{- else }}
- name: CASSANDRA_KEYSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ (include "cassandra.tlsPasswordsSecret" .) }}
name: {{ include "cassandra.tlsPasswordsSecret" . }}
key: keystore-password
{{- end }}
{{- end }}
- name: CASSANDRA_RACK
value: {{ .Values.cluster.rack }}
{{- if or .Values.jvm.maxHeapSize (include "cassandra.memory.getLimitInM" .) }}
@@ -454,6 +483,10 @@ spec:
volumeMounts:
- name: data
mountPath: {{ .Values.persistence.mountPath }}
{{- if .Values.usePasswordFiles }}
- name: cassandra-secrets
mountPath: /opt/bitnami/cassandra/secrets
{{- end }}
{{- if .Values.persistence.commitLogMountPath }}
- name: commitlog
mountPath: {{ .Values.persistence.commitLogMountPath }}
@@ -550,6 +583,17 @@ spec:
- name: metrics-conf
configMap:
name: {{ include "cassandra.metricsConfConfigMap" . }}
{{- if .Values.usePasswordFiles }}
- name: cassandra-secrets
projected:
sources:
- secret:
name: {{ include "common.secrets.name" (dict "existingSecret" .Values.dbUser.existingSecret "context" $) }}
{{- if or .Values.tls.passwordsSecret .Values.tls.tlsEncryptionSecretName .Values.tls.keystorePassword .Values.tls.truststorePassword .Values.tls.autoGenerated }}
- secret:
name: {{ include "cassandra.tlsPasswordsSecret" . }}
{{- end }}
{{- end }}
{{- if (include "cassandra.tlsEncryption" . ) }}
- name: certs
secret:
+3
View File
@@ -57,6 +57,9 @@ clusterDomain: cluster.local
## @param extraDeploy Array of extra objects to deploy with the release
##
extraDeploy: []
## @param usePasswordFiles Mount credentials as files instead of using environment variables
##
usePasswordFiles: true
## Enable diagnostic mode in the deployment
##
diagnosticMode: