Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make e2e test run over other networks #1339

Merged
merged 1 commit into from
Jun 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion test/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

source $(dirname $0)/../vendor/knative.dev/hack/e2e-tests.sh

export INGRESS_CLASS=${INGRESS_CLASS:-istio.ingress.networking.knative.dev}

function is_ingress_class() {
[[ "${INGRESS_CLASS}" == *"${1}"* ]]
}

function cluster_setup() {
header "Building client"
${REPO_ROOT_DIR}/hack/build.sh -f || return 1
Expand Down Expand Up @@ -59,7 +65,9 @@ function install_istio() {
}

function knative_setup() {
install_istio
if is_ingress_class istio; then
install_istio
fi

local serving_version=${KNATIVE_SERVING_VERSION:-latest}
header "Installing Knative Serving (${serving_version})"
Expand All @@ -80,6 +88,11 @@ function knative_setup() {
wait_until_pods_running knative-serving || return 1
fi

if ! is_ingress_class istio; then
kubectl patch configmap/config-network -n knative-serving \
--type merge -p '{"data": {"ingress.class":"'${INGRESS_CLASS}'"}}'
fi

local eventing_version=${KNATIVE_EVENTING_VERSION:-latest}
header "Installing Knative Eventing (${eventing_version})"

Expand Down