From 930ae9d3e71bcd3f4034aa4dae5eabb3ae04d11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Ro=C3=9Fner?= Date: Mon, 10 Feb 2025 09:42:51 +0100 Subject: [PATCH] fix(helmfile): Set default for domain to `opendesk.internal` to avoid enforcing DOMAIN environment variable for deployments using YAML overrides --- .gitlab/lint/lint-kyverno.yml | 1 - helmfile/apps/xwiki/values.yaml.gotmpl | 3 ++- helmfile/environments/default/global.yaml.gotmpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab/lint/lint-kyverno.yml b/.gitlab/lint/lint-kyverno.yml index 5eaf5734..c6067bc4 100644 --- a/.gitlab/lint/lint-kyverno.yml +++ b/.gitlab/lint/lint-kyverno.yml @@ -27,7 +27,6 @@ lint-kyverno: - "services-external" - "xwiki" script: - - "export DOMAIN=opendesk.internal" - "cd ${CI_PROJECT_DIR}/helmfile/apps/${APP}" - > node /app/opendesk-ci-cli/src/index.js generate-kyverno-env diff --git a/helmfile/apps/xwiki/values.yaml.gotmpl b/helmfile/apps/xwiki/values.yaml.gotmpl index 67754072..26799b37 100644 --- a/helmfile/apps/xwiki/values.yaml.gotmpl +++ b/helmfile/apps/xwiki/values.yaml.gotmpl @@ -161,7 +161,8 @@ properties: "property:xwiki:XWiki.XWikiServerXwiki^XWiki.XWikiServerClass.server": "{{ .Values.global.hosts.xwiki }}.{{ .Values.global.domain }}" "property:xwiki:XWiki.XWikiServerXwiki^XWiki.XWikiServerClass.port": 443 - ## This option overwrites the LDAP group mappings including all dynamically created mappings, therefore on XWiki restart an LDAP sync is triggered to load the dynamic mapping. + ## This option overwrites the LDAP group mappings including all dynamically created mappings, + # therefore on XWiki restart an LDAP sync is triggered to load the dynamic mapping. "property:xwiki:XWiki.XWikiPreferences^XWiki.XWikiPreferences.ldap_group_mapping": "xwiki:XWiki.XWikiAdminGroup=cn=managed-by-attribute-KnowledgemanagementAdmin,cn=groups,{{ .Values.ldap.baseDn }}" ## SMTP settings "property:xwiki:Mail.MailConfig^Mail.SendMailConfigClass.from": "{{ .Values.smtp.localpartNoReply }}@{{ .Values.global.domain }}" diff --git a/helmfile/environments/default/global.yaml.gotmpl b/helmfile/environments/default/global.yaml.gotmpl index 6b8c2b0f..376a4e78 100644 --- a/helmfile/environments/default/global.yaml.gotmpl +++ b/helmfile/environments/default/global.yaml.gotmpl @@ -10,7 +10,7 @@ global: ## Define host # - domain: {{ requiredEnv "DOMAIN" | quote }} + domain: {{ env "DOMAIN" | default "opendesk.internal" | quote }} ## Define mail host ## If this is unset the "domain" value above should be used in all references