Skip to content

Commit

Permalink
Refactor cassandra.truststoreSecretName helper
Browse files Browse the repository at this point in the history
Co-authored-by: Miguel Ruiz <[email protected]>
Signed-off-by: Tim Balzer <[email protected]>
  • Loading branch information
tbalzer and migruiz4 authored Aug 8, 2024
1 parent 1ee534d commit e696245
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions bitnami/cassandra/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,13 @@ Return the Cassandra TLS keystore secret
{{- end -}}
{{- end -}}
{{/*
Return the Cassandra TLS truststore secret
Return the Cassandra TLS truststore secret. If not provided we assume the trustore is stored in the keystore secret.
*/}}
{{- define "cassandra.truststoreSecretName" -}}
{{- $secretName := coalesce .Values.tls.existingTrustSecret .Values.tls.existingSecret .Values.tls.tlsEncryptionSecretName -}}
{{- if $secretName -}}
{{- printf "%s" (tpl $secretName $) -}}
{{- if .Values.tls.existingTrustSecret -}}
{{- print (tpl .Values.tls.existingTrustSecret $) -}}
{{- else -}}
{{- printf "%s-crt" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- print (include "cassandra.keystoreSecretName" .) -}}
{{- end -}}
{{- end -}}

Expand Down

0 comments on commit e696245

Please sign in to comment.