Add finalizers

This commit is contained in:
Nikolai Rodionov 2024-04-02 18:39:10 +02:00
parent cbcbd9b9e6
commit 28ff0d777f
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
2 changed files with 4 additions and 0 deletions

View File

@ -24,5 +24,7 @@ else
export SP_CUSTOMER_ID=$(jq -r .[0].objects.[0].object.metadata.namespace $BINDING_CONTEXT_PATH) export SP_CUSTOMER_ID=$(jq -r .[0].objects.[0].object.metadata.namespace $BINDING_CONTEXT_PATH)
export SP_ENVIRONMENT=$(jq -r .[0].objects.[0].object.metadata.name $BINDING_CONTEXT_PATH) export SP_ENVIRONMENT=$(jq -r .[0].objects.[0].object.metadata.name $BINDING_CONTEXT_PATH)
envsubst < /tpls/${PROVIDER}-cleanup.yaml | kubectl create -f - envsubst < /tpls/${PROVIDER}-cleanup.yaml | kubectl create -f -
kubectl patch configmap -n ${SP_CUSTOMER_ID} ${SP_ENVIRONMENT} \
-p '{"metadata":{"finalizers":null}}' --type=merge
fi fi

View File

@ -29,5 +29,7 @@ else
export SP_CUSTOMER_ID=$(jq -r .[0].objects.[0].object.metadata.namespace $BINDING_CONTEXT_PATH) export SP_CUSTOMER_ID=$(jq -r .[0].objects.[0].object.metadata.namespace $BINDING_CONTEXT_PATH)
export SP_ENVIRONMENT=$(jq -r .[0].objects.[0].object.metadata.name $BINDING_CONTEXT_PATH) export SP_ENVIRONMENT=$(jq -r .[0].objects.[0].object.metadata.name $BINDING_CONTEXT_PATH)
envsubst < /tpls/${PROVIDER}-${KUBERNETES}.yaml | kubectl create -f - envsubst < /tpls/${PROVIDER}-${KUBERNETES}.yaml | kubectl create -f -
kubectl patch configmap -n ${SP_CUSTOMER_ID} ${SP_ENVIRONMENT} \
-p '{"metadata":{"finalizers":"softplayer.net/bootstrapped"}}' --type=merge
fi fi