From 03ea7244d78939ec7ddffa03c2923bca6805a7e3 Mon Sep 17 00:00:00 2001 From: Tim Campbell Date: Wed, 13 Dec 2023 15:26:14 +0100 Subject: [PATCH] Add deepl configuration --- templates/configmap-env.yaml | 4 ++++ templates/deployment-sidekiq.yaml | 7 +++++++ templates/deployment-web.yaml | 7 +++++++ values.yaml | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/templates/configmap-env.yaml b/templates/configmap-env.yaml index da9b174..b956347 100644 --- a/templates/configmap-env.yaml +++ b/templates/configmap-env.yaml @@ -333,3 +333,7 @@ data: {{- range $k, $v := .Values.mastodon.extraEnvVars }} {{ $k }}: {{ quote $v }} {{- end }} + + {{- if .Values.mastodon.deepl.enabled }} + DEEPL_PLAN: {{ .Values.mastodon.deepl.plan }} + {{- end }} diff --git a/templates/deployment-sidekiq.yaml b/templates/deployment-sidekiq.yaml index 525343e..7fdafd3 100644 --- a/templates/deployment-sidekiq.yaml +++ b/templates/deployment-sidekiq.yaml @@ -121,6 +121,13 @@ spec: name: {{ $context.Values.mastodon.s3.existingSecret }} key: AWS_ACCESS_KEY_ID {{- end }} + {{- if and $context.Values.mastodon.deepl.enabled }} + - name: "DEEPL_API_KEY" + valueFrom: + secretKeyRef: + name: {{ $context.Values.mastodon.deepl.apiKeySecretRef.name }} + key: {{ $context.Values.mastodon.deepl.apiKeySecretRef.key }} + {{- end }} {{- if (not $context.Values.mastodon.s3.enabled) }} volumeMounts: - name: assets diff --git a/templates/deployment-web.yaml b/templates/deployment-web.yaml index 7817276..bfcce32 100644 --- a/templates/deployment-web.yaml +++ b/templates/deployment-web.yaml @@ -109,6 +109,13 @@ spec: name: {{ .Values.mastodon.s3.existingSecret }} key: AWS_ACCESS_KEY_ID {{- end }} + {{- if .Values.mastodon.deepl.enabled }} + - name: "DEEPL_API_KEY" + valueFrom: + secretKeyRef: + name: {{ .Values.mastodon.deepl.apiKeySecretRef.name }} + key: {{ .Values.mastodon.deepl.apiKeySecretRef.key }} + {{- end }} {{- if (not .Values.mastodon.s3.enabled) }} volumeMounts: - name: assets diff --git a/values.yaml b/values.yaml index bbaa11f..ab5b7d2 100644 --- a/values.yaml +++ b/values.yaml @@ -75,6 +75,12 @@ mastodon: permission: "" # -- If you have a caching proxy, enter its base URL here. alias_host: "" + deepl: + enabled: false + plan: + apiKeySecretRef: + name: + key: # these must be set manually; autogenerated keys are rotated on each upgrade secrets: secret_key_base: ""