Update e2e_test.go for clusters which have ServerSideFieldValidation

Also update prepare-cluster-for-integration-tests.sh for new
kubectl version command options.
This commit is contained in:
Ryan Richard
2022-07-25 17:25:21 -07:00
parent 7ccd41b5f2
commit c07cc6b8ec
2 changed files with 13 additions and 5 deletions
+2 -2
View File
@@ -175,8 +175,8 @@ if [[ "$skip_chromedriver_check" == "no" ]]; then
fi
fi
# Require kubectl >= 1.18.x
if [ "$(kubectl version --client=true --short | cut -d '.' -f 2)" -lt 18 ]; then
# Require kubectl >= 1.18.x.
if [ "$(kubectl version --client=true -o=json | grep gitVersion | cut -d '.' -f 2)" -lt 18 ]; then
log_error "kubectl >= 1.18.x is required, you have $(kubectl version --client=true --short | cut -d ':' -f2)"
exit 1
fi