Files
charts/bitnami/mastodon/templates/default-secret.yaml
Javier J. Salmerón García ef3176d2a3 [bitnami/mastodon] feat!: 💥 ♻️ Bump appVersion to 4.3 and refactor init containers (#29900)
* [bitnami/mastodon] feat:  Add active record keys

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

* Update CHANGELOG.md

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

* chore: ♻️ Refactor code

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

* fix: 🐛 Add missing metadata

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

* Update CHANGELOG.md

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

* fix: 🚨 Fix markdown issues

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

* Update CHANGELOG.md

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

* test:  Update selector

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

* fix: 🐛 Set hook as post-upgrade

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>

---------

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
2024-10-17 16:03:54 +02:00

45 lines
2.3 KiB
YAML

{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if not .Values.existingSecret }}
apiVersion: v1
kind: Secret
metadata:
{{- $secretName := printf "%s-default" (include "common.names.fullname" .) }}
name: {{ $secretName }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: mastodon
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- if .Values.adminPassword }}
MASTODON_ADMIN_PASSWORD: {{ .Values.adminPassword | b64enc | quote }}
{{- end }}
{{- if .Values.secretKeyBase }}
SECRET_KEY_BASE: {{ .Values.secretKeyBase | b64enc | quote }}
{{- end }}
{{- if .Values.otpSecret }}
OTP_SECRET: {{ .Values.otpSecret | b64enc | quote }}
{{- end }}
{{- if .Values.vapidPrivateKey }}
VAPID_PRIVATE_KEY: {{ .Values.vapidPrivateKey | b64enc | quote }}
{{- end }}
{{- if .Values.vapidPublicKey }}
VAPID_PUBLIC_KEY: {{ .Values.vapidPublicKey | b64enc | quote }}
{{- end }}
{{- if .Values.smtp.server }}
SMTP_SERVER: {{ .Values.smtp.server | b64enc | quote }}
{{- end }}
ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY: {{ include "common.secrets.passwords.manage" (dict "secret" $secretName "key" "controller-password" "providedValues" (list "activeRecordEncryptionDeterministicKey") "failOnNew" false "context" $) }}
ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT: {{ include "common.secrets.passwords.manage" (dict "secret" $secretName "key" "controller-password" "providedValues" (list "activeRecordEncryptionKeyDerivationSalt") "failOnNew" false "context" $) }}
ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY: {{ include "common.secrets.passwords.manage" (dict "secret" $secretName "key" "controller-password" "providedValues" (list "activeRecordEncryptionPrimaryKey") "failOnNew" false "context" $) }}
{{- if not (include "mastodon.elasticsearch.auth.enabled" .) }}
# HACK: Even though Elasticsearch has authentication disabled. The rake chewy command always requires a password
MASTODON_ELASTICSEARCH_PASSWORD: {{ print "value_not_used" | b64enc | quote }}
{{- end }}
{{- end }}