From ce19c50ca4de8f6dce91ebddc590d62b12353e2d Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Fri, 10 May 2024 15:45:12 +0200 Subject: [PATCH] Add Templates to pretty config --- hooks/install-application.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/install-application.sh b/hooks/install-application.sh index 580f44d..fb18b3f 100755 --- a/hooks/install-application.sh +++ b/hooks/install-application.sh @@ -25,7 +25,7 @@ else export $(jq -r .[0].object.data.vars $BINDING_CONTEXT_PATH) export SP_CUSTOMER_ID=$(jq -r .[0].object.metadata.namespace $BINDING_CONTEXT_PATH) export SP_CONFIG_NAME=$(jq -r .[0].object.metadata.name $BINDING_CONTEXT_PATH) - export SP_APPLICATION=$(jq -r .[0].object.data.values $BINDING_CONTEXT_PATH | base64 -d | yq '.helm.release') + export SP_APPLICATION=$(jq -r .[0].object.data."values.yaml" $BINDING_CONTEXT_PATH | base64 -d | yq '.helm.release') flux create source helm $SP_APPLICATION \ --namespace=$SP_CUSTOMER_ID \ @@ -39,7 +39,7 @@ else --kubeconfig-secret-ref=$SP_CUSTOMER_ID-config \ --target-namespace=default --export \ | yq '.spec.storageNamespace="helm-installations"' \ - | kubectl create -f - + | kubectl apply -f - flux reconcile helmrelease --namespace=$SP_CUSTOMER_ID $SP_APPLICATION fi