From e97c57c3a4cba03fe4f106de56b8f187c2c4f0a0 Mon Sep 17 00:00:00 2001 From: Alex Nordlund Date: Sun, 27 Nov 2022 11:59:44 +0100 Subject: [PATCH] Add support for S3 existing secret to cronjob --- templates/cronjob-media-remove.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/templates/cronjob-media-remove.yaml b/templates/cronjob-media-remove.yaml index 41f1feb..d70afeb 100644 --- a/templates/cronjob-media-remove.yaml +++ b/templates/cronjob-media-remove.yaml @@ -67,6 +67,18 @@ spec: key: redis-password - name: "PORT" value: {{ .Values.mastodon.web.port | quote }} + {{- if (and .Values.mastodon.s3.enabled .Values.mastodon.s3.existingSecret) }} + - name: "AWS_SECRET_ACCESS_KEY" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.s3.existingSecret }} + key: AWS_SECRET_ACCESS_KEY + - name: "AWS_ACCESS_KEY_ID" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.s3.existingSecret }} + key: AWS_ACCESS_KEY_ID + {{- end }} {{- if (not .Values.mastodon.s3.enabled) }} volumeMounts: - name: assets