From 55c6d2f07d39fe70817698db893a997684468c25 Mon Sep 17 00:00:00 2001 From: Gerd Oberlechner Date: Sun, 3 Nov 2024 22:43:04 +0100 Subject: [PATCH] parameterize registration deployment Signed-off-by: Gerd Oberlechner --- maestro/registration/Makefile | 6 +++--- maestro/registration/config.tmpl.mk | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/maestro/registration/Makefile b/maestro/registration/Makefile index d62b331844..700006415a 100644 --- a/maestro/registration/Makefile +++ b/maestro/registration/Makefile @@ -4,11 +4,11 @@ $(shell ../../templatize.sh $(DEPLOY_ENV) config.tmpl.mk config.mk) include config.mk deploy: - @if ! kubectl get service maestro -n maestro > /dev/null 2>&1; then \ - echo "Error: Service 'maestro' not found in namespace 'maestro'"; \ + @if ! kubectl get service maestro -n ${MAESTRO_NAMESPACE_NAME} > /dev/null 2>&1; then \ + echo "Error: Service 'maestro' not found in namespace '${CONSUMER_NAME}'"; \ exit 1; \ fi helm upgrade --install ${CONSUMER_NAME} ./helm \ - --namespace maestro \ + --namespace ${MAESTRO_NAMESPACE_NAME} \ --set consumerName=${CONSUMER_NAME} .PHONY: deploy diff --git a/maestro/registration/config.tmpl.mk b/maestro/registration/config.tmpl.mk index 8918876a7c..020b960067 100644 --- a/maestro/registration/config.tmpl.mk +++ b/maestro/registration/config.tmpl.mk @@ -1 +1,2 @@ CONSUMER_NAME ?= {{ .maestroConsumerName }} +MAESTRO_NAMESPACE_NAME ?= {{ .maestroServerNamespace }}