Skip to content

Commit

Permalink
Merge pull request #671 from menglingwei/main
Browse files Browse the repository at this point in the history
Support ApiServeranonymous-auth
  • Loading branch information
l1b0k authored Aug 28, 2024
2 parents 960c504 + 39a6677 commit de5a342
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions policy/policyinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ "$DATASTORE_TYPE" = "kubernetes" ]; then
exit 1
fi
return_code="$(curl -k -o /dev/null -I -L -s -w "%{http_code}" https://"${KUBERNETES_SERVICE_HOST}":"${KUBERNETES_SERVICE_PORT:-443}")"
if [ "$return_code" -ne 403 ]&&[ "$return_code" -ne 200 ]&&[ "$return_code" -ne 201 ];then
if [ "$return_code" -ne 401 ]&&[ "$return_code" -ne 403 ]&&[ "$return_code" -ne 200 ]&&[ "$return_code" -ne 201 ];then
echo "can not access kubernetes service, exiting"
exit 1
fi
Expand Down Expand Up @@ -173,4 +173,4 @@ fi
else
# shellcheck disable=SC2016
exec socat TCP-LISTEN:9099,bind=127.0.0.1,fork,reuseaddr system:'sleep 2;kill -9 $SOCAT_PID 2>/dev/null'
fi
fi

0 comments on commit de5a342

Please sign in to comment.