Skip to content

Commit

Permalink
Revert all unnecessary changes made for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
norbjd committed Apr 7, 2024
1 parent 0aaa024 commit 631f8ce
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 164 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/kind-e2e-upgrade.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: KinD e2e upgrade tests

on:
#pull_request:
# branches: [ 'main' ]
pull_request:
branches: [ 'main' ]

push:
branches: [ 'main' ]

defaults:
run:
shell: bash
working-directory: ./src/knative.dev/net-kourier

jobs:
e2e-upgrade-tests:
name: e2e tests
Expand Down Expand Up @@ -64,4 +67,4 @@ jobs:
- name: Run upgrade tests
run: |
./test/e2e-upgrade-kind.sh
./test/e2e-upgrade-kind.sh
10 changes: 5 additions & 5 deletions .github/workflows/kind-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
fail-fast: false # Keep running if one leg fails.
matrix:
k8s-version:
#- v1.28.x
- v1.28.x
- v1.29.x

gateway:
#- quay.io/maistra-dev/proxyv2-ubi8:2.4-latest
#- docker.io/envoyproxy/envoy:v1.26-latest
#- docker.io/envoyproxy/envoy:v1.27-latest
- quay.io/maistra-dev/proxyv2-ubi8:2.4-latest
- docker.io/envoyproxy/envoy:v1.26-latest
- docker.io/envoyproxy/envoy:v1.27-latest
- docker.io/envoyproxy/envoy:v1.28-latest

upstream-tls:
- plain
#- tls
- tls

env:
GOPATH: ${{ github.workspace }}
Expand Down
312 changes: 156 additions & 156 deletions test/e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,162 +42,162 @@ IPS=($(kubectl get nodes -lkubernetes.io/hostname!=kind-control-plane -ojsonpath
export "GATEWAY_OVERRIDE=kourier"
export "GATEWAY_NAMESPACE_OVERRIDE=${KOURIER_GATEWAY_NAMESPACE}"

# echo ">> Running conformance tests"
# go test -count=1 -short -timeout=20m -tags=e2e ./test/conformance/... ./test/e2e/... \
# --enable-alpha --enable-beta \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
#
# echo ">> Scale up components for HA tests"
# kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" scale deployment 3scale-kourier-gateway --replicas=2
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" scale deployment net-kourier-controller --replicas=2
#
# echo ">> Running HA tests"
# go test -count=1 -timeout=15m -failfast -parallel=1 -tags=e2e ./test/ha -spoofinterval="10ms" \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
#
# echo ">> Scale down after HA tests"
# kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" scale deployment 3scale-kourier-gateway --replicas=1
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" scale deployment net-kourier-controller --replicas=1
#
# echo ">> Running TLS Cipher suites"
# echo ">> Setup cipher suites"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"cipher-suites":"ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-ECDSA-CHACHA20-POLY1305"}}'
#
# go test -v -tags=e2e ./test/tls/... \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
#
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"cipher-suites":""}}'
#
# echo ">> Setup one wildcard certificate"
# $(dirname $0)/generate-wildcard-cert.sh
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller CERTS_SECRET_NAMESPACE="${KOURIER_CONTROL_NAMESPACE}" CERTS_SECRET_NAME=wildcard-certs
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller --timeout=300s
#
# echo ">> Running OneTLSCert tests"
# go test -race -count=1 -timeout=20m -tags=e2e ./test/cert/... \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
#
# export "KOURIER_EXTAUTHZ_PROTOCOL=grpc"
#
# echo ">> Setup ExtAuthz gRPC"
# ko apply -f test/config/extauthz/grpc
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" wait --timeout=300s --for=condition=Available deployment/externalauthz-grpc
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller KOURIER_EXTAUTHZ_HOST=externalauthz-grpc.knative-serving:6000
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller --timeout=300s
#
# echo ">> Running ExtAuthz tests"
# go test -race -count=1 -timeout=20m -tags=e2e ./test/extauthz/... \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
#
# echo ">> Unset ExtAuthz gRPC"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller KOURIER_EXTAUTHZ_HOST-
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller
#
# echo ">> Setup ExtAuthz gRPC with pack as bytes option"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller \
# KOURIER_EXTAUTHZ_HOST=externalauthz-grpc.knative-serving:6000 \
# KOURIER_EXTAUTHZ_PACKASBYTES=true
#
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller --timeout=300s
#
# echo ">> Running ExtAuthz tests"
# go test -race -count=1 -timeout=20m -tags=e2e ./test/extauthz/... \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
#
# echo ">> Unset ExtAuthz gRPC"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller KOURIER_EXTAUTHZ_HOST- KOURIER_EXTAUTHZ_PACKASBYTES-
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller
#
# echo ">> Setup ExtAuthz HTTP"
# ko apply -f test/config/extauthz/http
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" wait --timeout=300s --for=condition=Available deployment/externalauthz-http
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller \
# KOURIER_EXTAUTHZ_HOST=externalauthz-http.knative-serving:8080 \
# KOURIER_EXTAUTHZ_PROTOCOL=http
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller --timeout=300s
#
# echo ">> Running ExtAuthz tests"
# go test -race -count=1 -timeout=20m -tags=e2e ./test/extauthz/... \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
#
# echo ">> Unset ExtAuthz HTTP"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller KOURIER_EXTAUTHZ_HOST- KOURIER_EXTAUTHZ_PROTOCOL-
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller
#
# echo ">> Setup ExtAuthz HTTP with path prefix"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment externalauthz-http PATH_PREFIX="/check"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" wait --timeout=300s --for=condition=Available deployment/externalauthz-http
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller \
# KOURIER_EXTAUTHZ_HOST=externalauthz-http.knative-serving:8080 \
# KOURIER_EXTAUTHZ_PROTOCOL=http \
# KOURIER_EXTAUTHZ_PATHPREFIX="/check"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller --timeout=300s
#
# echo ">> Running ExtAuthz tests"
# go test -race -count=1 -timeout=20m -tags=e2e ./test/extauthz/... \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
#
# echo ">> Unset ExtAuthz HTTP with path prefix"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller KOURIER_EXTAUTHZ_HOST- KOURIER_EXTAUTHZ_PROTOCOL- KOURIER_EXTAUTHZ_PATHPREFIX-
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller
#
# echo ">> Setup Proxy Protocol"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"enable-proxy-protocol":"true"}}'
#
# echo ">> Running Proxy Protocol tests"
# go test -race -count=1 -timeout=5m -tags=e2e ./test/proxyprotocol/... \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
#
# echo ">> Unset Proxy Protocol"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"enable-proxy-protocol":"false"}}'
#
# echo ">> Setup Tracing"
# kubectl apply -f test/config/tracing
# kubectl -n tracing wait --timeout=300s --for=condition=Available deployment/jaeger
# export TRACING_COLLECTOR_FULL_ENDPOINT="$(kubectl -n tracing get svc/jaeger -o jsonpath='{.spec.clusterIP}'):9411/api/v2/spans"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p "{
# \"data\":{
# \"tracing-collector-full-endpoint\": \"$TRACING_COLLECTOR_FULL_ENDPOINT\"
# }
# }"
#
# echo ">> Running Tracing tests"
# go test -race -count=1 -timeout=5m -tags=e2e ./test/tracing/... \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
#
# echo ">> Unset Tracing"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"tracing-collector-full-endpoint": ""}}'
# kubectl delete -f test/config/tracing
# unset TRACING_COLLECTOR_FULL_ENDPOINT
#
# echo ">> Set IdleTimeout to 50s"
# kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"stream-idle-timeout":"50s"}}'
#
# echo ">> Running IdleTimeout tests"
# go test -v -tags=e2e ./test/timeout/... \
# --ingressendpoint="${IPS[0]}" \
# --ingressClass=kourier.ingress.networking.knative.dev \
# --cluster-suffix="$CLUSTER_SUFFIX"
echo ">> Running conformance tests"
go test -count=1 -short -timeout=20m -tags=e2e ./test/conformance/... ./test/e2e/... \
--enable-alpha --enable-beta \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

echo ">> Scale up components for HA tests"
kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" scale deployment 3scale-kourier-gateway --replicas=2
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" scale deployment net-kourier-controller --replicas=2

echo ">> Running HA tests"
go test -count=1 -timeout=15m -failfast -parallel=1 -tags=e2e ./test/ha -spoofinterval="10ms" \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

echo ">> Scale down after HA tests"
kubectl -n "${KOURIER_GATEWAY_NAMESPACE}" scale deployment 3scale-kourier-gateway --replicas=1
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" scale deployment net-kourier-controller --replicas=1

echo ">> Running TLS Cipher suites"
echo ">> Setup cipher suites"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"cipher-suites":"ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-ECDSA-CHACHA20-POLY1305"}}'

go test -v -tags=e2e ./test/tls/... \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"cipher-suites":""}}'

echo ">> Setup one wildcard certificate"
$(dirname $0)/generate-wildcard-cert.sh
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller CERTS_SECRET_NAMESPACE="${KOURIER_CONTROL_NAMESPACE}" CERTS_SECRET_NAME=wildcard-certs
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller --timeout=300s

echo ">> Running OneTLSCert tests"
go test -race -count=1 -timeout=20m -tags=e2e ./test/cert/... \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

export "KOURIER_EXTAUTHZ_PROTOCOL=grpc"

echo ">> Setup ExtAuthz gRPC"
ko apply -f test/config/extauthz/grpc
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" wait --timeout=300s --for=condition=Available deployment/externalauthz-grpc
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller KOURIER_EXTAUTHZ_HOST=externalauthz-grpc.knative-serving:6000
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller --timeout=300s

echo ">> Running ExtAuthz tests"
go test -race -count=1 -timeout=20m -tags=e2e ./test/extauthz/... \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

echo ">> Unset ExtAuthz gRPC"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller KOURIER_EXTAUTHZ_HOST-
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller

echo ">> Setup ExtAuthz gRPC with pack as bytes option"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller \
KOURIER_EXTAUTHZ_HOST=externalauthz-grpc.knative-serving:6000 \
KOURIER_EXTAUTHZ_PACKASBYTES=true

kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller --timeout=300s

echo ">> Running ExtAuthz tests"
go test -race -count=1 -timeout=20m -tags=e2e ./test/extauthz/... \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

echo ">> Unset ExtAuthz gRPC"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller KOURIER_EXTAUTHZ_HOST- KOURIER_EXTAUTHZ_PACKASBYTES-
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller

echo ">> Setup ExtAuthz HTTP"
ko apply -f test/config/extauthz/http
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" wait --timeout=300s --for=condition=Available deployment/externalauthz-http
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller \
KOURIER_EXTAUTHZ_HOST=externalauthz-http.knative-serving:8080 \
KOURIER_EXTAUTHZ_PROTOCOL=http
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller --timeout=300s

echo ">> Running ExtAuthz tests"
go test -race -count=1 -timeout=20m -tags=e2e ./test/extauthz/... \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

echo ">> Unset ExtAuthz HTTP"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller KOURIER_EXTAUTHZ_HOST- KOURIER_EXTAUTHZ_PROTOCOL-
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller

echo ">> Setup ExtAuthz HTTP with path prefix"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment externalauthz-http PATH_PREFIX="/check"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" wait --timeout=300s --for=condition=Available deployment/externalauthz-http
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller \
KOURIER_EXTAUTHZ_HOST=externalauthz-http.knative-serving:8080 \
KOURIER_EXTAUTHZ_PROTOCOL=http \
KOURIER_EXTAUTHZ_PATHPREFIX="/check"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller --timeout=300s

echo ">> Running ExtAuthz tests"
go test -race -count=1 -timeout=20m -tags=e2e ./test/extauthz/... \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

echo ">> Unset ExtAuthz HTTP with path prefix"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" set env deployment net-kourier-controller KOURIER_EXTAUTHZ_HOST- KOURIER_EXTAUTHZ_PROTOCOL- KOURIER_EXTAUTHZ_PATHPREFIX-
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" rollout status deployment/net-kourier-controller

echo ">> Setup Proxy Protocol"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"enable-proxy-protocol":"true"}}'

echo ">> Running Proxy Protocol tests"
go test -race -count=1 -timeout=5m -tags=e2e ./test/proxyprotocol/... \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

echo ">> Unset Proxy Protocol"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"enable-proxy-protocol":"false"}}'

echo ">> Setup Tracing"
kubectl apply -f test/config/tracing
kubectl -n tracing wait --timeout=300s --for=condition=Available deployment/jaeger
export TRACING_COLLECTOR_FULL_ENDPOINT="$(kubectl -n tracing get svc/jaeger -o jsonpath='{.spec.clusterIP}'):9411/api/v2/spans"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p "{
\"data\":{
\"tracing-collector-full-endpoint\": \"$TRACING_COLLECTOR_FULL_ENDPOINT\"
}
}"

echo ">> Running Tracing tests"
go test -race -count=1 -timeout=5m -tags=e2e ./test/tracing/... \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

echo ">> Unset Tracing"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"tracing-collector-full-endpoint": ""}}'
kubectl delete -f test/config/tracing
unset TRACING_COLLECTOR_FULL_ENDPOINT

echo ">> Set IdleTimeout to 50s"
kubectl -n "${KOURIER_CONTROL_NAMESPACE}" patch configmap/config-kourier --type merge -p '{"data":{"stream-idle-timeout":"50s"}}'

echo ">> Running IdleTimeout tests"
go test -v -tags=e2e ./test/timeout/... \
--ingressendpoint="${IPS[0]}" \
--ingressClass=kourier.ingress.networking.knative.dev \
--cluster-suffix="$CLUSTER_SUFFIX"

echo ">> Change DRAIN_TIME_SECONDS and terminationGracePeriodSeconds for graceful shutdown tests"
export DRAIN_TIME_SECONDS=30
Expand Down

0 comments on commit 631f8ce

Please sign in to comment.