diff --git a/templates/deployment-sidekiq.yaml b/templates/deployment-sidekiq.yaml index c6ba2eb..cb98dc2 100644 --- a/templates/deployment-sidekiq.yaml +++ b/templates/deployment-sidekiq.yaml @@ -100,6 +100,10 @@ spec: name: {{ include "mastodon.fullname" $context }}-env - secretRef: name: {{ template "mastodon.secretName" $context }} + {{- if $context.Values.mastodon.extraEnvFrom }} + - configMapRef: + name: {{ $context.Values.mastodon.extraEnvFrom }} + {{- end}} env: - name: "DB_PASS" valueFrom: diff --git a/templates/deployment-streaming.yaml b/templates/deployment-streaming.yaml index 1e4acaa..b3c26bd 100644 --- a/templates/deployment-streaming.yaml +++ b/templates/deployment-streaming.yaml @@ -51,6 +51,10 @@ spec: envFrom: - configMapRef: name: {{ include "mastodon.fullname" . }}-env + {{- if .Values.mastodon.extraEnvFrom }} + - configMapRef: + name: {{ .Values.mastodon.extraEnvFrom }} + {{- end}} env: - name: "DB_PASS" valueFrom: diff --git a/templates/deployment-web.yaml b/templates/deployment-web.yaml index b8e8533..28490a7 100644 --- a/templates/deployment-web.yaml +++ b/templates/deployment-web.yaml @@ -77,6 +77,10 @@ spec: name: {{ include "mastodon.fullname" . }}-env - secretRef: name: {{ template "mastodon.secretName" . }} + {{- if .Values.mastodon.extraEnvFrom }} + - configMapRef: + name: {{ .Values.mastodon.extraEnvFrom }} + {{- end}} env: - name: "DB_PASS" valueFrom: diff --git a/values.yaml b/values.yaml index 39e1ff9..8378928 100644 --- a/values.yaml +++ b/values.yaml @@ -274,8 +274,15 @@ mastodon: # Sets the PREPARED_STATEMENTS environment variable: https://docs.joinmastodon.org/admin/config/#prepared_statements preparedStatements: true - # Additional env vars defined in all pods + + # 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.) extraEnvVars: {} + + # Alternatively specify extra environment variables stored in a ConfigMap. + # The specified ConfigMap should contain the additional environment variables in key-value format. + # extraEnvFrom: + ingress: enabled: true