From 10555efb043c620d52dff52c875a87b87f4c4b78 Mon Sep 17 00:00:00 2001 From: Lars Scheibling Date: Fri, 12 May 2023 17:00:07 +0200 Subject: [PATCH] Added override for environment --- .gitlab-ci.yml | 2 +- Chart/templates/configmap.yaml | 5 +++++ Chart/values.yaml | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ade64ea..3196b49 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - HELM_CHART_VERSION: "0.8.8" + HELM_CHART_VERSION: "0.8.9" stages: - deploy diff --git a/Chart/templates/configmap.yaml b/Chart/templates/configmap.yaml index 2cf0c19..46da66e 100644 --- a/Chart/templates/configmap.yaml +++ b/Chart/templates/configmap.yaml @@ -28,7 +28,12 @@ data: SMTP_FROM_NAME: "V3 Customer Mailer" {{- end }} + {{- if and .Values.site .Values.site.overrideEnvironment }} + WP_ENV: "{{ .Values.site.overrideEnvironment }}" + {{- else }} WP_ENV: "production" + {{- endif }} + {{- if .Values.site.overrideMainUrl }} WP_HOME: "https://{{ .Values.site.overrideMainUrl }}" {{- else }} diff --git a/Chart/values.yaml b/Chart/values.yaml index 97321d7..7bf5ee0 100644 --- a/Chart/values.yaml +++ b/Chart/values.yaml @@ -44,6 +44,9 @@ site: additional_env: {} # MY_ENV_VAR: "value" + # Override the environment. Valid values are production, staging and development + # overrideEnvironment: "staging" + # Create sites with another main domain for WP, # but the rest of the components named according to site-tld # overrideMainUrl: ""