diff --git a/test/e2e/tests/authorization-client-ip.go b/test/e2e/tests/authorization-client-ip.go index e03e07a76a6..94ee22c6a9f 100644 --- a/test/e2e/tests/authorization-client-ip.go +++ b/test/e2e/tests/authorization-client-ip.go @@ -80,6 +80,7 @@ var AuthorizationClientIPTest = suite.ConformanceTest{ }, Response: http.Response{ StatusCode: 200, + Headers: nil, }, Namespace: ns, } @@ -105,6 +106,7 @@ var AuthorizationClientIPTest = suite.ConformanceTest{ }, Response: http.Response{ StatusCode: 200, + Headers: nil, }, Namespace: ns, } @@ -131,6 +133,7 @@ var AuthorizationClientIPTest = suite.ConformanceTest{ }, Response: http.Response{ StatusCode: 200, + Headers: nil, }, Namespace: ns, } diff --git a/tools/hack/create-cluster.sh b/tools/hack/create-cluster.sh index a78adaffd57..992ee5def92 100755 --- a/tools/hack/create-cluster.sh +++ b/tools/hack/create-cluster.sh @@ -6,12 +6,33 @@ set -euo pipefail CLUSTER_NAME=${CLUSTER_NAME:-"envoy-gateway"} METALLB_VERSION=${METALLB_VERSION:-"v0.13.10"} KIND_NODE_TAG=${KIND_NODE_TAG:-"v1.28.0"} +NUM_WORKERS=${NUM_WORKERS:-""} + + +KIND_CFG=$(cat <<-EOM +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane +EOM +) + +# https://kind.sigs.k8s.io/docs/user/quick-start/#multi-node-clusters +if [[ -n "${NUM_WORKERS}" ]]; then +for _ in $(seq 1 "${NUM_WORKERS}"); do + KIND_CFG+=$(printf "\n%s" "- role: worker") +done +fi ## Create kind cluster. if [[ -z "${KIND_NODE_TAG}" ]]; then - tools/bin/kind create cluster --name "${CLUSTER_NAME}" + cat << EOF | tools/bin/kind create cluster --name "${CLUSTER_NAME}" --config - +${KIND_CFG} +EOF else - tools/bin/kind create cluster --image "kindest/node:${KIND_NODE_TAG}" --name "${CLUSTER_NAME}" + cat << EOF | tools/bin/kind create cluster --image "kindest/node:${KIND_NODE_TAG}" --name "${CLUSTER_NAME}" --config - +${KIND_CFG} +EOF fi ## Install MetalLB.