]> cat aescling's git repositories - mastodon.git/commitdiff
Allow S3 to use an existing secret (#18997)
authorAlex Nordlund <deep.alexander@gmail.com>
Thu, 25 Aug 2022 02:39:11 +0000 (04:39 +0200)
committeraescling <aescling+gitlab@cat.family>
Mon, 5 Sep 2022 04:28:01 +0000 (00:28 -0400)
chart/templates/deployment-web.yaml

index 8b8bb4f29cbabe3fc50375ad096f799db3a340fa..e57d1f6e1951aa164215f706a67156d03bd39924 100644 (file)
@@ -74,6 +74,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