From 63a5514b29d44520058260cfb64c9fbf256e366a Mon Sep 17 00:00:00 2001 From: Alex Nordlund Date: Thu, 25 Aug 2022 04:39:11 +0200 Subject: Allow S3 to use an existing secret (#18997) --- chart/templates/deployment-web.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'chart') diff --git a/chart/templates/deployment-web.yaml b/chart/templates/deployment-web.yaml index 5e22ca539..ab722c77b 100644 --- a/chart/templates/deployment-web.yaml +++ b/chart/templates/deployment-web.yaml @@ -70,6 +70,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 -- cgit