From a9820afb07b6ab31b9915354e25c36a3e1a7885b Mon Sep 17 00:00:00 2001 From: Alistair Young Date: Sun, 11 Jun 2023 13:12:31 -0500 Subject: [PATCH] Enable supplementary environment variables. --- templates/deployment-sidekiq.yaml | 4 ++++ templates/deployment-streaming.yaml | 4 ++++ templates/deployment-web.yaml | 4 ++++ values.yaml | 5 +++++ 4 files changed, 17 insertions(+) diff --git a/templates/deployment-sidekiq.yaml b/templates/deployment-sidekiq.yaml index 5dc9244..4aa68ac 100644 --- a/templates/deployment-sidekiq.yaml +++ b/templates/deployment-sidekiq.yaml @@ -84,6 +84,10 @@ spec: name: {{ include "mastodon.fullname" $context }}-env - secretRef: name: {{ template "mastodon.secretName" $context }} + {{- if $context.Values.mastodon.extraEnvironment }} + - configMapRef: + name: {{ $context.Values.mastodon.extraEnvironment }} + {{- end}} env: - name: "DB_PASS" valueFrom: diff --git a/templates/deployment-streaming.yaml b/templates/deployment-streaming.yaml index ea08b1b..facc4aa 100644 --- a/templates/deployment-streaming.yaml +++ b/templates/deployment-streaming.yaml @@ -49,6 +49,10 @@ spec: envFrom: - configMapRef: name: {{ include "mastodon.fullname" . }}-env + {{- if .Values.mastodon.extraEnvironment }} + - configMapRef: + name: {{ .Values.mastodon.extraEnvironment }} + {{- end}} env: - name: "DB_PASS" valueFrom: diff --git a/templates/deployment-web.yaml b/templates/deployment-web.yaml index 420c277..6f0027b 100644 --- a/templates/deployment-web.yaml +++ b/templates/deployment-web.yaml @@ -65,6 +65,10 @@ spec: name: {{ include "mastodon.fullname" . }}-env - secretRef: name: {{ template "mastodon.secretName" . }} + {{- if .Values.mastodon.extraEnvironment }} + - configMapRef: + name: {{ .Values.mastodon.extraEnvironment }} + {{- end}} env: - name: "DB_PASS" valueFrom: diff --git a/values.yaml b/values.yaml index a4660e2..9832af7 100644 --- a/values.yaml +++ b/values.yaml @@ -206,6 +206,11 @@ mastodon: # Sets the PREPARED_STATEMENTS environment variable: https://docs.joinmastodon.org/admin/config/#prepared_statements preparedStatements: true + # Specify extra environment variables to be added to all Mastodon pods. + # These can be used for configuration not included in this chart (including configuration for Mastodon varietals.) + # The specified ConfigMap should contain the additional environment variables in key-value format. + # extraEnvironment: + ingress: enabled: true annotations: