Update scrtipts
This commit is contained in:
parent
ddf62b31eb
commit
12afd1346b
11
hooks/up.sh
11
hooks/up.sh
@ -20,17 +20,14 @@ kubernetes:
|
|||||||
values: ["bootstrap"]
|
values: ["bootstrap"]
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
echo $BINDING_CONTEXT_PATH
|
PROVIDER=$(jq -r .[0].objects.[0].object.data.provider $BINDING_CONTEXT_PATH)
|
||||||
cmName=$(jq -r .[0].object $BINDING_CONTEXT_PATH)
|
KUBERNETES=$(jq -r .[0].objects.[0].object.data.kubernetes $BINDING_CONTEXT_PATH)
|
||||||
echo "ConfigMap '${cmName}' added"
|
|
||||||
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
|
if ! [ -f /tpls/${PROVIDER}-${KUBERNETES}.yaml ]; then
|
||||||
echo "ERROR: template not found for ${PROVIDER}-${KUBERNETES}"
|
echo "ERROR: template not found for ${PROVIDER}-${KUBERNETES}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
export SP_CUSTOMER_ID=$(jq -r .[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].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 -
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user