From 2375ae94c5f5c64647a2598ed67b7cc35b2cdd61 Mon Sep 17 00:00:00 2001 From: mikhail-klimko Date: Mon, 20 May 2024 20:04:38 +0300 Subject: [PATCH] feat(cf-common): extend external-secrets to allow dataFrom --- .../templates/classic/_env_var_secret_ref.tpl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/charts/cf-common/templates/classic/_env_var_secret_ref.tpl b/charts/cf-common/templates/classic/_env_var_secret_ref.tpl index a5435b9..534c2cc 100644 --- a/charts/cf-common/templates/classic/_env_var_secret_ref.tpl +++ b/charts/cf-common/templates/classic/_env_var_secret_ref.tpl @@ -81,6 +81,24 @@ New secret implementation {{- end }} {{- end }} +{{- /* +MONGO_URI env var value +*/}} +{{- define "cf-common-0.18.2.classic.mongo-uri-archive-env-var-value" }} +{{- /* +Check for legacy global.mongoURI +*/}} + {{- if if or .Values.global.mongoURIArchive .Values.global.mongoURI }} +{{- print "$(MONGO_URI_ARCHIVE)" }} +{{- /* +New secret implementation +*/}} + {{- else }} +{{- print "$(MONGODB_PROTOCOL)://$(MONGODB_USER):$(MONGODB_PASSWORD)@$(MONGODB_HOST)/$(MONGODB_DATABASE_ARCHIVE)?$(MONGODB_OPTIONS)" }} + {{- end }} +{{- end }} + + {{- /* REDIS_URL env var secret name */}}