File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -785,6 +785,28 @@ install_ffr_k8s() {
785785 sed -i "${LINE_NUM}a\\${IPv6_LINE}" receive_filtered.yaml
786786 done
787787 fi
788+
789+ # frr-k8s webhook is declaring readiness before its endpoint is serving.
790+ # Let's do our own probing. Also will print logs in case of failure so we get
791+ # insights on why this is hapenning
792+ local r
793+ r=0
794+ timeout 60s bash -x <<EOF || r=$?
795+ echo "Attempting to reach frr-k8s webhook"
796+ kind export kubeconfig --name ovn
797+ while true; do
798+ docker exec ovn-control-plane curl -ksS --connect-timeout 0.1 https://$(kubectl get svc -n frr-k8s-system frr-k8s-webhook-service -o jsonpath='{.spec.clusterIP}')
799+ [ \$? -eq 0 ] && exit 0
800+ echo "Couldn't reach frr-k8s webhook, trying in 1s..."
801+ sleep 1s
802+ done
803+ EOF
804+ echo "r=$r"
805+ if [ "$r" -ne "0" ]; then
806+ kubectl describe pod -n frr-k8s-system -l app=frr-k8s-webhook-server
807+ kubectl logs -n frr-k8s-system -l app=frr-k8s-webhook-server
808+ fi
809+
788810 kubectl apply -n frr-k8s-system -f receive_filtered.yaml
789811 popd || exit 1
790812
You can’t perform that action at this time.
0 commit comments