Merge "Fix check ingress phase"
This commit is contained in:
commit
5050c327c0
@ -14,12 +14,27 @@
|
||||
|
||||
set -xe
|
||||
|
||||
export TARGET_IP=$(kubectl --context $KCTL_CONTEXT \
|
||||
export TIMEOUT=${TIMEOUT:-60}
|
||||
|
||||
end=$(($(date +%s) + $TIMEOUT))
|
||||
while true; do
|
||||
export TARGET_IP="$(kubectl --request-timeout 10s \
|
||||
--context $KCTL_CONTEXT \
|
||||
--namespace ingress \
|
||||
get pods \
|
||||
-l app.kubernetes.io/component=controller \
|
||||
-o jsonpath='{.items[*].status.hostIP}')
|
||||
|
||||
-o jsonpath='{.items[*].status.hostIP}')"
|
||||
if [ ! -z $TARGET_IP ]; then
|
||||
break
|
||||
else
|
||||
now=$(date +%s)
|
||||
if [ $now -gt $end ]; then
|
||||
echo "TARGET_IP is not ready before TIMEOUT=$TIMEOUT" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Ensure we can reach ingress controller default backend" 1>&2
|
||||
if [ "404" != "$(curl --head \
|
||||
@ -32,6 +47,7 @@ if [ "404" != "$(curl --head \
|
||||
kubectl --context $KCTL_CONTEXT get all -n flux-system 1>&2
|
||||
kubectl --context $KCTL_CONTEXT logs -n flux-system -l app=helm-controller 1>&2
|
||||
kubectl --context $KCTL_CONTEXT get hr --all-namespaces -o yaml 1>&2
|
||||
kubectl --context $KCTL_CONTEXT --namespace ingress get pods -l app.kubernetes.io/component=controller -o yaml 1>&2
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user