Fox scripts
This commit is contained in:
parent
eb03484d56
commit
6c7d167d78
@ -17,8 +17,8 @@ kubernetes:
|
||||
values: ["bootstrap"]
|
||||
EOF
|
||||
else
|
||||
PROVIDER=$(jq -r .[0].objects.[0].object.data.provider $BINDING_CONTEXT_PATH)
|
||||
KUBERNETES=$(jq -r .[0].objects.[0].object.data.kubernetes $BINDING_CONTEXT_PATH)
|
||||
PROVIDER=$(jq -r .[0].object.data.provider $BINDING_CONTEXT_PATH)
|
||||
KUBERNETES=$(jq -r .[0].object.data.kubernetes $BINDING_CONTEXT_PATH)
|
||||
echo "running the ${PROVIDER}-cleanup hook"
|
||||
|
||||
if ! [ -f /tpls/${PROVIDER}-cleanup.yaml ]; then
|
||||
@ -26,8 +26,8 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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_CUSTOMER_ID=$(jq -r .[0].object.metadata.namespace $BINDING_CONTEXT_PATH)
|
||||
export SP_ENVIRONMENT=$(jq -r .[0].object.metadata.name $BINDING_CONTEXT_PATH)
|
||||
echo "removing the ${SP_ENVIRONMENT} owned by ${SP_CUSTOMER_ID}"
|
||||
|
||||
envsubst < /tpls/${PROVIDER}-cleanup.yaml | kubectl create -f -
|
||||
|
@ -22,14 +22,14 @@ kubernetes:
|
||||
values: ["bootstrap"]
|
||||
EOF
|
||||
else
|
||||
PROVIDER=$(jq -r .[0].objects.[0].object.data.provider $BINDING_CONTEXT_PATH)
|
||||
KUBERNETES=$(jq -r .[0].objects.[0].object.data.kubernetes $BINDING_CONTEXT_PATH)
|
||||
PROVIDER=$(jq -r .[0].object.data.provider $BINDING_CONTEXT_PATH)
|
||||
KUBERNETES=$(jq -r .[0].object.data.kubernetes $BINDING_CONTEXT_PATH)
|
||||
if ! [ -f /tpls/${PROVIDER}-${KUBERNETES}.yaml ]; then
|
||||
echo "ERROR: template not found for ${PROVIDER}-${KUBERNETES}"
|
||||
exit 1
|
||||
fi
|
||||
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_CUSTOMER_ID=$(jq -r .[0].object.metadata.namespace $BINDING_CONTEXT_PATH)
|
||||
export SP_ENVIRONMENT=$(jq -r .[0].object.metadata.name $BINDING_CONTEXT_PATH)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user