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

Understanding Which ratelimit Package to Use #1760

Open
Ronnie-personal opened this issue Aug 3, 2023 · 7 comments
Open

Understanding Which ratelimit Package to Use #1760

Ronnie-personal opened this issue Aug 3, 2023 · 7 comments
Labels

Comments

@Ronnie-personal
Copy link
Contributor

Ronnie-personal commented Aug 3, 2023

Description: Currently, 'internal/xds/translator/ratelimit.go' utilizes 'github.com/envoyproxy/go-control-plane/ratelimit/config/ratelimit/v3'. 'ratelimit.RateLimitConfig' does not have the ValidateAll() function, as a result, we cannot validate the resource. We need to understand why we don't use 'github.com/envoyproxy/go-control-plane/envoy/config/ratelimit/v3'.

[optional Relevant Links:] You may find more context at #1662 (comment)

@arkodg
Copy link
Contributor

arkodg commented Aug 3, 2023

looks like the API lives here https://github.com/envoyproxy/ratelimit/blob/main/api/ratelimit/config/ratelimit/v3/rls_conf.proto and its generated go files live here
https://github.com/envoyproxy/go-control-plane/blob/main/ratelimit/config/ratelimit/v3/rls_conf.pb.go

so the proto API will need to be sprinkled with tags from https://github.com/bufbuild/protoc-gen-validate and then we'd need to run this https://github.com/bufbuild/protoc-gen-validate#go

what I can't find is, where is the buf / protoc-gen-validate cmd supposed to be run ?
any idea @phlax @mattklein123 @renuka-fernando ?

@Ronnie-personal
Copy link
Contributor Author

looks like the API lives here https://github.com/envoyproxy/ratelimit/blob/main/api/ratelimit/config/ratelimit/v3/rls_conf.proto and its generated go files live here https://github.com/envoyproxy/go-control-plane/blob/main/ratelimit/config/ratelimit/v3/rls_conf.pb.go

so the proto API will need to be sprinkled with tags from https://github.com/bufbuild/protoc-gen-validate and then we'd need to run this https://github.com/bufbuild/protoc-gen-validate#go

what I can't find is, where is the buf / protoc-gen-validate cmd supposed to be run ? any idea @phlax @mattklein123 @renuka-fernando ?

@phlax @mattklein123 @renuka-fernando
I would like to follow up. Could you please help with the questions?

@renuka-fernando
Copy link

looks like the API lives here https://github.com/envoyproxy/ratelimit/blob/main/api/ratelimit/config/ratelimit/v3/rls_conf.proto and its generated go files live here https://github.com/envoyproxy/go-control-plane/blob/main/ratelimit/config/ratelimit/v3/rls_conf.pb.go

so the proto API will need to be sprinkled with tags from https://github.com/bufbuild/protoc-gen-validate and then we'd need to run this https://github.com/bufbuild/protoc-gen-validate#go

what I can't find is, where is the buf / protoc-gen-validate cmd supposed to be run ? any idea @phlax @mattklein123 @renuka-fernando ?

We have not automated generating pb files. I've created an issue [1] for that but couldn't get it done.

[1] envoyproxy/go-control-plane#646

@renuka-fernando
Copy link

Description: Currently, 'internal/xds/translator/ratelimit.go' utilizes 'github.com/envoyproxy/go-control-plane/ratelimit/config/ratelimit/v3'. 'ratelimit.RateLimitConfig' does not have the ValidateAll() function, as a result, we cannot validate the resource. We need to understand why we don't use 'github.com/envoyproxy/go-control-plane/envoy/config/ratelimit/v3'.

[optional Relevant Links:] You may find more context at #1662 (comment)

We can't use 'github.com/envoyproxy/go-control-plane/envoy/config/ratelimit/v3'. This is the API for Envoy and RateLimit Service communication.

'github.com/envoyproxy/go-control-plane/ratelimit/config/ratelimit/v3' is for RateLimit Service and RateLimit xDS service communication.

@Ronnie-personal
Copy link
Contributor Author

looks like the API lives here https://github.com/envoyproxy/ratelimit/blob/main/api/ratelimit/config/ratelimit/v3/rls_conf.proto and its generated go files live here https://github.com/envoyproxy/go-control-plane/blob/main/ratelimit/config/ratelimit/v3/rls_conf.pb.go
so the proto API will need to be sprinkled with tags from https://github.com/bufbuild/protoc-gen-validate and then we'd need to run this https://github.com/bufbuild/protoc-gen-validate#go
what I can't find is, where is the buf / protoc-gen-validate cmd supposed to be run ? any idea @phlax @mattklein123 @renuka-fernando ?

We have not automated generating pb files. I've created an issue [1] for that but couldn't get it done.

[1] envoyproxy/go-control-plane#646

@renuka-fernando
Thanks for the information.
By any chance you could re-open envoyproxy/go-control-plane#646?

Thanks.

@renuka-fernando
Copy link

It looks like I don't have the necessary permissions to reopen the issue envoyproxy/go-control-plane#646.

cc: @phlax

@github-actions
Copy link

github-actions bot commented Sep 9, 2023

This issue has been automatically marked as stale because it has not had activity in the last 30 days.

@github-actions github-actions bot added the stale label Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants