Catch errors waiting for controller deployment
This commit is contained in:
parent
9bf919a43b
commit
2f70c351cb
2 changed files with 12 additions and 14 deletions
|
|
@ -22,6 +22,16 @@ export NAMESPACE=$1
|
|||
|
||||
echo "deploying NGINX Ingress controller in namespace $NAMESPACE"
|
||||
|
||||
function on_exit {
|
||||
local error_code="$?"
|
||||
|
||||
test $error_code == 0 && return;
|
||||
|
||||
echo "Obtaining ingress controller pod logs..."
|
||||
kubectl logs -l app=ingress-nginx -n $NAMESPACE
|
||||
}
|
||||
trap on_exit EXIT
|
||||
|
||||
sed "s@\${NAMESPACE}@${NAMESPACE}@" $DIR/../manifests/ingress-controller/mandatory.yaml | kubectl apply --namespace=$NAMESPACE -f -
|
||||
cat $DIR/../manifests/ingress-controller/service-nodeport.yaml | kubectl apply --namespace=$NAMESPACE -f -
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue