about summary refs log tree commit diff
path: root/chart/templates/secrets.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'chart/templates/secrets.yaml')
-rw-r--r--chart/templates/secrets.yaml28
1 files changed, 28 insertions, 0 deletions
diff --git a/chart/templates/secrets.yaml b/chart/templates/secrets.yaml
new file mode 100644
index 000000000..74f4b1516
--- /dev/null
+++ b/chart/templates/secrets.yaml
@@ -0,0 +1,28 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ template "mastodon.fullname" . }}
+  labels:
+    {{- include "mastodon.labels" . | nindent 4 }}
+type: Opaque
+data:
+  {{- if not (empty .Values.secrets.secret_key_base) }}
+  SECRET_KEY_BASE: "{{ .Values.secrets.secret_key_base | b64enc }}"
+  {{- else }}
+  SECRET_KEY_BASE: {{ required "secret_key_base is required" .Values.secrets.secret_key_base }}
+  {{- end }}
+  {{- if not (empty .Values.secrets.otp_secret) }}
+  OTP_SECRET: "{{ .Values.secrets.otp_secret | b64enc }}"
+  {{- else }}
+  OTP_SECRET: {{ required "otp_secret is required" .Values.secrets.otp_secret }}
+  {{- end }}
+  {{- if not (empty .Values.secrets.vapid.private_key) }}
+  VAPID_PRIVATE_KEY: "{{ .Values.secrets.vapid.private_key | b64enc }}"
+  {{- else }}
+  VAPID_PRIVATE_KEY: {{ required "vapid.private_key is required" .Values.secrets.vapid.private_key }}
+  {{- end }}
+  {{- if not (empty .Values.secrets.vapid.public_key) }}
+  VAPID_PUBLIC_KEY: "{{ .Values.secrets.vapid.public_key | b64enc }}"
+  {{- else }}
+  VAPID_PUBLIC_KEY: {{ required "vapid.public_key is required" .Values.secrets.vapid.public_key }}
+  {{- end }}