about summary refs log tree commit diff
path: root/chart
diff options
context:
space:
mode:
authorAlex Nordlund <deep.alexander@gmail.com>2022-08-25 04:39:11 +0200
committerGitHub <noreply@github.com>2022-08-25 04:39:11 +0200
commit63a5514b29d44520058260cfb64c9fbf256e366a (patch)
tree56f3af25f1268efa560b7746b504fbbc6031ad34 /chart
parent42ff4dce412752a05c2e3b990c93b08cb46ffd88 (diff)
Allow S3 to use an existing secret (#18997)
Diffstat (limited to 'chart')
-rw-r--r--chart/templates/deployment-web.yaml12
1 files changed, 12 insertions, 0 deletions
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