Skip to content

Commit

Permalink
Merge pull request #674 from l1b0k/release-1.6
Browse files Browse the repository at this point in the history
add 401 http code
  • Loading branch information
BSWANG authored Aug 29, 2024
2 parents a4d8283 + 6419a5e commit d032f6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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

0 comments on commit d032f6a

Please sign in to comment.