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

setup ratelimit e2e tests #1239

Merged
merged 14 commits into from
May 5, 2023
Merged

setup ratelimit e2e tests #1239

merged 14 commits into from
May 5, 2023

Conversation

zirain
Copy link
Contributor

@zirain zirain commented Apr 1, 2023

init e2e test base on gateway-api conformance test suite, related to kubernetes-sigs/gateway-api#1899

Fixes: #863

cc @arkodg

@zirain zirain requested a review from a team as a code owner April 1, 2023 03:11
go.mod Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Merging #1239 (6822b1f) into main (eee6d39) will increase coverage by 0.17%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1239      +/-   ##
==========================================
+ Coverage   62.34%   62.51%   +0.17%     
==========================================
  Files          78       78              
  Lines       10973    10973              
==========================================
+ Hits         6841     6860      +19     
+ Misses       3680     3664      -16     
+ Partials      452      449       -3     

see 2 files with indirect coverage changes

go.mod Outdated Show resolved Hide resolved
@zirain zirain changed the title setup e2e tests setup ratelimit e2e tests Apr 3, 2023
test/e2e/e2e_test.go Outdated Show resolved Hide resolved
test/e2e/e2e_test.go Outdated Show resolved Hide resolved
test/e2e/e2e_test.go Outdated Show resolved Hide resolved
@arkodg
Copy link
Contributor

arkodg commented Apr 3, 2023

thanks @zirain, this PR is a massive addition for the project to improve e2e and reduce regressions for our Extension APIs

@zirain zirain requested a review from arkodg April 4, 2023 00:51
@arkodg
Copy link
Contributor

arkodg commented Apr 4, 2023

thanks for addressing comments @zirain , this PR adds a fork for the gateway-api repo which im hoping we dont need, and the upstream PR you raised is merged and can be brought in to this project soon

@zirain
Copy link
Contributor Author

zirain commented Apr 4, 2023

thanks for addressing comments @zirain , this PR adds a fork for the gateway-api repo which im hoping we dont need, and the upstream PR you raised is merged and can be brought in to this project soon

yes, we should not include my fork repo. let's wait upstream PR merged.

@arkodg
Copy link
Contributor

arkodg commented Apr 4, 2023

another option is to write our own utils/suite package and we can write a custom Setup with a custom kubectl apply but we leverage the existing Run
https://github.com/kubernetes-sigs/gateway-api/blob/main/conformance/utils/suite/suite.go

@zirain
Copy link
Contributor Author

zirain commented Apr 6, 2023

another option is to write our own utils/suite package and we can write a custom Setup with a custom kubectl apply but we leverage the existing Run https://github.com/kubernetes-sigs/gateway-api/blob/main/conformance/utils/suite/suite.go

unless kubernetes-sigs/gateway-api#1899 is unacceptable.

@zirain zirain mentioned this pull request Apr 7, 2023
zirain added 7 commits May 4, 2023 10:51
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
zirain added 6 commits May 4, 2023 10:52
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
@zirain
Copy link
Contributor Author

zirain commented May 4, 2023

cc @arkodg , this's ready to go, PTAL.

kubectl rollout restart deployment envoy-gateway -n envoy-gateway-system
kubectl wait --timeout=5m -n envoy-gateway-system deployment/envoy-gateway --for=condition=Available

.PHONY: run-e2e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about run-e2e-ratelimit ? Since we might need to add other e2e tests like auth, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this's the entrypoint for all e2e tests, for now there's only ratelimit tests

.PHONY: install-ratelimit
install-ratelimit:
@$(LOG_TARGET)
kubectl apply -f examples/redis/redis.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only nit here would be to split up redis install with patching/updating the EnvoyGateway Configmap, but it can be improved later

Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for adding the e2e infra, should give us more confidence while building out extended features

@Xunzhuo Xunzhuo merged commit c0ca9de into envoyproxy:main May 5, 2023
18 checks passed
@zirain zirain deleted the e2e branch May 5, 2023 02:08
@qicz qicz added area/ci CI and build related issues area/testing labels May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci CI and build related issues area/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E2E framework for Gateway API Extensions
4 participants