mirror of https://github.com/knative/docs.git
Update test-infra: some fixes (#1263)
* Update test-infra: some fixes * Install Istio from Addon
This commit is contained in:
parent
8d2451efa9
commit
041f4a8463
|
@ -116,14 +116,14 @@
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
digest = "1:e52814856d1182e3f80db2dbab1b2888f1d7c486a9094ebc27aa18d241e43a08"
|
digest = "1:f27efa11fb1aec3e502e2ed95d9a1211a93f8a791b7da0a06fdade0d98de5008"
|
||||||
name = "github.com/knative/test-infra"
|
name = "github.com/knative/test-infra"
|
||||||
packages = [
|
packages = [
|
||||||
"scripts",
|
"scripts",
|
||||||
"tools/dep-collector",
|
"tools/dep-collector",
|
||||||
]
|
]
|
||||||
pruneopts = "UT"
|
pruneopts = "UT"
|
||||||
revision = "6a4119d87d5e494fe74b17d096db3e5aca57361c"
|
revision = "75f6ca1c4dc3b3ae5dc1a1a433753957a9340e83"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:5985ef4caf91ece5d54817c11ea25f182697534f8ae6521eadcd628c142ac4b6"
|
digest = "1:5985ef4caf91ece5d54817c11ea25f182697534f8ae6521eadcd628c142ac4b6"
|
||||||
|
|
|
@ -172,6 +172,9 @@ This is a helper script for Knative E2E test scripts. To use it:
|
||||||
will immediately start the tests against the cluster currently configured for
|
will immediately start the tests against the cluster currently configured for
|
||||||
`kubectl`.
|
`kubectl`.
|
||||||
|
|
||||||
|
1. By default Istio is installed on the cluster via Addon, using `--skip-istio` if
|
||||||
|
you choose not to have it preinstalled.
|
||||||
|
|
||||||
1. You can force running the tests against a specific GKE cluster version by using
|
1. You can force running the tests against a specific GKE cluster version by using
|
||||||
the `--cluster-version` flag and passing a full version as the flag value.
|
the `--cluster-version` flag and passing a full version as the flag value.
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ function create_test_cluster() {
|
||||||
|
|
||||||
# Smallest cluster required to run the end-to-end-tests
|
# Smallest cluster required to run the end-to-end-tests
|
||||||
local CLUSTER_CREATION_ARGS=(
|
local CLUSTER_CREATION_ARGS=(
|
||||||
--gke-create-command="container clusters create --quiet --enable-autoscaling --min-nodes=${E2E_MIN_CLUSTER_NODES} --max-nodes=${E2E_MAX_CLUSTER_NODES} --scopes=cloud-platform --enable-basic-auth --no-issue-client-certificate ${EXTRA_CLUSTER_CREATION_FLAGS[@]}"
|
--gke-create-command="container clusters create --quiet --enable-autoscaling --min-nodes=${E2E_MIN_CLUSTER_NODES} --max-nodes=${E2E_MAX_CLUSTER_NODES} --scopes=cloud-platform --enable-basic-auth --no-issue-client-certificate ${GKE_ADDONS} ${EXTRA_CLUSTER_CREATION_FLAGS[@]}"
|
||||||
--gke-shape={\"default\":{\"Nodes\":${E2E_MIN_CLUSTER_NODES}\,\"MachineType\":\"${E2E_CLUSTER_MACHINE}\"}}
|
--gke-shape={\"default\":{\"Nodes\":${E2E_MIN_CLUSTER_NODES}\,\"MachineType\":\"${E2E_CLUSTER_MACHINE}\"}}
|
||||||
--provider=gke
|
--provider=gke
|
||||||
--deployment=gke
|
--deployment=gke
|
||||||
|
@ -258,7 +258,7 @@ function create_test_cluster_with_retries() {
|
||||||
# Exit if test succeeded
|
# Exit if test succeeded
|
||||||
[[ "$(get_test_return_code)" == "0" ]] && return
|
[[ "$(get_test_return_code)" == "0" ]] && return
|
||||||
# If test failed not because of cluster creation stockout, return
|
# If test failed not because of cluster creation stockout, return
|
||||||
[[ -z "$(grep -Eio 'does not have enough resources to fulfill the request' ${cluster_creation_log})" ]] && return
|
[[ -z "$(grep -Eio 'does not have enough resources available to fulfill the request' ${cluster_creation_log})" ]] && return
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -349,9 +349,11 @@ function fail_test() {
|
||||||
RUN_TESTS=0
|
RUN_TESTS=0
|
||||||
EMIT_METRICS=0
|
EMIT_METRICS=0
|
||||||
SKIP_KNATIVE_SETUP=0
|
SKIP_KNATIVE_SETUP=0
|
||||||
|
SKIP_ISTIO=0
|
||||||
GCP_PROJECT=""
|
GCP_PROJECT=""
|
||||||
E2E_SCRIPT=""
|
E2E_SCRIPT=""
|
||||||
E2E_CLUSTER_VERSION=""
|
E2E_CLUSTER_VERSION=""
|
||||||
|
GKE_ADDONS=""
|
||||||
EXTRA_CLUSTER_CREATION_FLAGS=()
|
EXTRA_CLUSTER_CREATION_FLAGS=()
|
||||||
EXTRA_KUBETEST_FLAGS=()
|
EXTRA_KUBETEST_FLAGS=()
|
||||||
E2E_SCRIPT_CUSTOM_FLAGS=()
|
E2E_SCRIPT_CUSTOM_FLAGS=()
|
||||||
|
@ -383,6 +385,7 @@ function initialize() {
|
||||||
--run-tests) RUN_TESTS=1 ;;
|
--run-tests) RUN_TESTS=1 ;;
|
||||||
--emit-metrics) EMIT_METRICS=1 ;;
|
--emit-metrics) EMIT_METRICS=1 ;;
|
||||||
--skip-knative-setup) SKIP_KNATIVE_SETUP=1 ;;
|
--skip-knative-setup) SKIP_KNATIVE_SETUP=1 ;;
|
||||||
|
--skip-istio) SKIP_ISTIO=1 ;;
|
||||||
*)
|
*)
|
||||||
[[ $# -ge 2 ]] || abort "missing parameter after $1"
|
[[ $# -ge 2 ]] || abort "missing parameter after $1"
|
||||||
shift
|
shift
|
||||||
|
@ -412,6 +415,8 @@ function initialize() {
|
||||||
is_protected_gcr ${KO_DOCKER_REPO} && \
|
is_protected_gcr ${KO_DOCKER_REPO} && \
|
||||||
abort "\$KO_DOCKER_REPO set to ${KO_DOCKER_REPO}, which is forbidden"
|
abort "\$KO_DOCKER_REPO set to ${KO_DOCKER_REPO}, which is forbidden"
|
||||||
|
|
||||||
|
(( SKIP_ISTIO )) || GKE_ADDONS="--addons=Istio"
|
||||||
|
|
||||||
readonly RUN_TESTS
|
readonly RUN_TESTS
|
||||||
readonly EMIT_METRICS
|
readonly EMIT_METRICS
|
||||||
readonly GCP_PROJECT
|
readonly GCP_PROJECT
|
||||||
|
@ -419,6 +424,7 @@ function initialize() {
|
||||||
readonly EXTRA_CLUSTER_CREATION_FLAGS
|
readonly EXTRA_CLUSTER_CREATION_FLAGS
|
||||||
readonly EXTRA_KUBETEST_FLAGS
|
readonly EXTRA_KUBETEST_FLAGS
|
||||||
readonly SKIP_KNATIVE_SETUP
|
readonly SKIP_KNATIVE_SETUP
|
||||||
|
readonly GKE_ADDONS
|
||||||
|
|
||||||
if (( ! RUN_TESTS )); then
|
if (( ! RUN_TESTS )); then
|
||||||
create_test_cluster
|
create_test_cluster
|
||||||
|
|
|
@ -321,14 +321,6 @@ function report_go_test() {
|
||||||
# Install the latest stable Knative/serving in the current cluster.
|
# Install the latest stable Knative/serving in the current cluster.
|
||||||
function start_latest_knative_serving() {
|
function start_latest_knative_serving() {
|
||||||
header "Starting Knative Serving"
|
header "Starting Knative Serving"
|
||||||
subheader "Installing Istio"
|
|
||||||
echo "Running Istio CRD from ${KNATIVE_ISTIO_CRD_YAML}"
|
|
||||||
kubectl apply -f ${KNATIVE_ISTIO_CRD_YAML} || return 1
|
|
||||||
wait_until_batch_job_complete istio-system || return 1
|
|
||||||
echo "Installing Istio from ${KNATIVE_ISTIO_YAML}"
|
|
||||||
kubectl apply -f ${KNATIVE_ISTIO_YAML} || return 1
|
|
||||||
wait_until_pods_running istio-system || return 1
|
|
||||||
kubectl label namespace default istio-injection=enabled || return 1
|
|
||||||
subheader "Installing Knative Serving"
|
subheader "Installing Knative Serving"
|
||||||
echo "Installing Serving from ${KNATIVE_SERVING_RELEASE}"
|
echo "Installing Serving from ${KNATIVE_SERVING_RELEASE}"
|
||||||
kubectl apply -f ${KNATIVE_SERVING_RELEASE} || return 1
|
kubectl apply -f ${KNATIVE_SERVING_RELEASE} || return 1
|
||||||
|
|
Loading…
Reference in New Issue