diff --git a/charts/mastodon/templates/cronjob-media-remove.yaml b/charts/mastodon/templates/cronjob-media-remove.yaml index 57ec700..f9d0060 100644 --- a/charts/mastodon/templates/cronjob-media-remove.yaml +++ b/charts/mastodon/templates/cronjob-media-remove.yaml @@ -57,6 +57,28 @@ spec: name: {{ template "mastodon.secretName" . }} {{- end }} env: + {{- if .Values.mastodon.secrets.existingSecret }} + - name: "SECRET_KEY_BASE" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }} + - name: "OTP_SECRET" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.optSecret }} + - name: "VAPID_PRIVATE_KEY" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }} + - name: "VAPID_PUBLIC_KEY" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }} + {{- end }} - name: "DB_PASS" valueFrom: secretKeyRef: diff --git a/charts/mastodon/templates/deployment-sidekiq.yaml b/charts/mastodon/templates/deployment-sidekiq.yaml index f591860..7815428 100644 --- a/charts/mastodon/templates/deployment-sidekiq.yaml +++ b/charts/mastodon/templates/deployment-sidekiq.yaml @@ -87,6 +87,28 @@ spec: name: {{ template "mastodon.secretName" . }} {{- end }} env: + {{- if .Values.mastodon.secrets.existingSecret }} + - name: "SECRET_KEY_BASE" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }} + - name: "OTP_SECRET" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.optSecret }} + - name: "VAPID_PRIVATE_KEY" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }} + - name: "VAPID_PUBLIC_KEY" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }} + {{- end }} - name: "DB_PASS" valueFrom: secretKeyRef: diff --git a/charts/mastodon/templates/job-chewy-upgrade.yaml b/charts/mastodon/templates/job-chewy-upgrade.yaml index c388071..a3f3e19 100644 --- a/charts/mastodon/templates/job-chewy-upgrade.yaml +++ b/charts/mastodon/templates/job-chewy-upgrade.yaml @@ -59,6 +59,28 @@ spec: name: {{ template "mastodon.secretName" . }} {{- end }} env: + {{- if .Values.mastodon.secrets.existingSecret }} + - name: "SECRET_KEY_BASE" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }} + - name: "OTP_SECRET" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.optSecret }} + - name: "VAPID_PRIVATE_KEY" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }} + - name: "VAPID_PUBLIC_KEY" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }} + {{- end }} - name: "DB_PASS" valueFrom: secretKeyRef: diff --git a/charts/mastodon/templates/job-create-admin.yaml b/charts/mastodon/templates/job-create-admin.yaml index 28ca82e..a3e5238 100644 --- a/charts/mastodon/templates/job-create-admin.yaml +++ b/charts/mastodon/templates/job-create-admin.yaml @@ -58,6 +58,28 @@ spec: name: {{ template "mastodon.secretName" . }} {{- end }} env: + {{- if .Values.mastodon.secrets.existingSecret }} + - name: "SECRET_KEY_BASE" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }} + - name: "OTP_SECRET" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.optSecret }} + - name: "VAPID_PRIVATE_KEY" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }} + - name: "VAPID_PUBLIC_KEY" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.secrets.existingSecret }} + key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }} + {{- end }} - name: "ADMIN_USER" {{- if .Values.mastodon.createAdmin.existingSecret }} valueFrom: