diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 2c3d635fad..200e7d5718 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -187,6 +187,7 @@ jobs: - name: Read Benchmark report run: cat test/benchmark/benchmark_report/benchmark_report.md + resilience-test: runs-on: ubuntu-latest if: ${{ ! startsWith(github.event_name, 'push') }} @@ -203,7 +204,7 @@ jobs: publish: runs-on: ubuntu-latest - needs: [conformance-test, e2e-test] + needs: [conformance-test, e2e-test, resilience-test] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: ./tools/github-actions/setup-deps diff --git a/test/config/envoy-gateway-config.yaml b/test/config/envoy-gateaway-config/default.yaml similarity index 100% rename from test/config/envoy-gateway-config.yaml rename to test/config/envoy-gateaway-config/default.yaml diff --git a/test/config/envoy-gateaway-config/gateway-namespace-mode.yaml b/test/config/envoy-gateaway-config/gateway-namespace-mode.yaml new file mode 100644 index 0000000000..a467c274b2 --- /dev/null +++ b/test/config/envoy-gateaway-config/gateway-namespace-mode.yaml @@ -0,0 +1,24 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: envoy-gateway-config + namespace: envoy-gateway-system +data: + envoy-gateway.yaml: | + apiVersion: gateway.envoyproxy.io/v1alpha1 + kind: EnvoyGateway + provider: + type: Kubernetes + kubernetes: + deploy: + type: GatewayNamespace + gateway: + controllerName: gateway.envoyproxy.io/gatewayclass-controller + extensionApis: + enableEnvoyPatchPolicy: true + enableBackend: true + rateLimit: + backend: + type: Redis + redis: + url: redis.redis-system.svc.cluster.local:6379 diff --git a/test/config/helm/default.yaml b/test/config/helm/default.yaml new file mode 100644 index 0000000000..2503344382 --- /dev/null +++ b/test/config/helm/default.yaml @@ -0,0 +1 @@ +# the default configuration for the gateway helm chart diff --git a/test/config/helm/gateway-namespace-mode.yaml b/test/config/helm/gateway-namespace-mode.yaml new file mode 100644 index 0000000000..7694f06211 --- /dev/null +++ b/test/config/helm/gateway-namespace-mode.yaml @@ -0,0 +1,9 @@ +config: + envoyGateway: + gateway: + controllerName: gateway.envoyproxy.io/gatewayclass-controller + provider: + type: Kubernetes + kubernetes: + deploy: + type: GatewayNamespace diff --git a/tools/make/kube.mk b/tools/make/kube.mk index ef5311cd2c..020e4da744 100644 --- a/tools/make/kube.mk +++ b/tools/make/kube.mk @@ -28,6 +28,10 @@ E2E_CLEANUP ?= true E2E_TIMEOUT ?= 20m E2E_TEST_ARGS ?= -v -tags e2e -timeout $(E2E_TIMEOUT) +KUBE_DEPLOY_PROFILE ?= default +KUBE_DEPLOY_HELM_VALUES_FILE = $(ROOT_DIR)/test/config/helm/$(KUBE_DEPLOY_PROFILE).yaml +KUBE_DEPLOY_EG_CONFIG_FILE = $(ROOT_DIR)/test/config/envoy-gateaway-config/$(KUBE_DEPLOY_PROFILE).yaml + # Set Kubernetes Resources Directory Path ifeq ($(origin KUBE_PROVIDER_DIR),undefined) KUBE_PROVIDER_DIR := $(ROOT_DIR)/internal/provider/kubernetes/config @@ -105,7 +109,12 @@ endif .PHONY: kube-deploy kube-deploy: manifests helm-generate.gateway-helm ## Install Envoy Gateway into the Kubernetes cluster specified in ~/.kube/config. @$(LOG_TARGET) - helm install eg charts/gateway-helm --set deployment.envoyGateway.imagePullPolicy=$(IMAGE_PULL_POLICY) -n envoy-gateway-system --create-namespace --debug --timeout='$(WAIT_TIMEOUT)' --wait --wait-for-jobs + helm install eg charts/gateway-helm \ + --set deployment.envoyGateway.imagePullPolicy=$(IMAGE_PULL_POLICY) \ + -n envoy-gateway-system --create-namespace \ + --debug --timeout='$(WAIT_TIMEOUT)' \ + --wait --wait-for-jobs \ + -f $(KUBE_DEPLOY_HELM_VALUES_FILE) .PHONY: kube-deploy-for-benchmark-test kube-deploy-for-benchmark-test: manifests helm-generate ## Install Envoy Gateway and prometheus-server for benchmark test purpose only. @@ -192,7 +201,7 @@ e2e-prepare: prepare-ip-family ## Prepare the environment for running e2e tests @$(LOG_TARGET) kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-ratelimit --for=condition=Available kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available - kubectl apply -f test/config/envoy-gateway-config.yaml + kubectl apply -f $(KUBE_DEPLOY_EG_CONFIG_FILE) kubectl apply -f test/config/gatewayclass.yaml .PHONY: run-e2e