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

Translate RateLimitInfra into K8s resources #939

Merged
merged 3 commits into from
Jan 31, 2023
Merged

Conversation

arkodg
Copy link
Contributor

@arkodg arkodg commented Jan 26, 2023

Relates to #670

Signed-off-by: Arko Dasgupta arko@tetrate.io

Relates to envoyproxy#670

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg requested a review from a team as a code owner January 26, 2023 00:51
@arkodg arkodg marked this pull request as draft January 26, 2023 00:51
@arkodg arkodg mentioned this pull request Jan 26, 2023
7 tasks
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg marked this pull request as ready for review January 26, 2023 22:56
@codecov-commenter
Copy link

Codecov Report

Merging #939 (86bbaf7) into main (84044da) will decrease coverage by 2.34%.
The diff coverage is 21.11%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #939      +/-   ##
==========================================
- Coverage   63.84%   61.51%   -2.34%     
==========================================
  Files          54       54              
  Lines        7834     8140     +306     
==========================================
+ Hits         5002     5007       +5     
- Misses       2519     2818     +299     
- Partials      313      315       +2     
Impacted Files Coverage Δ
internal/cmd/server.go 6.97% <0.00%> (-0.23%) ⬇️
internal/infrastructure/kubernetes/infra.go 27.63% <7.50%> (-16.12%) ⬇️
internal/infrastructure/kubernetes/service.go 40.54% <14.28%> (-31.96%) ⬇️
internal/infrastructure/kubernetes/deployment.go 54.02% <16.45%> (-32.71%) ⬇️
internal/infrastructure/kubernetes/labels.go 77.77% <33.33%> (-22.23%) ⬇️
internal/infrastructure/kubernetes/configmap.go 52.17% <40.00%> (-23.69%) ⬇️
...ternal/infrastructure/kubernetes/serviceaccount.go 56.66% <42.22%> (-21.30%) ⬇️
internal/provider/kubernetes/helpers.go 79.72% <0.00%> (-3.38%) ⬇️
internal/provider/kubernetes/controller.go 48.41% <0.00%> (-0.68%) ⬇️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
// rateLimitInfraHTTPPort is the http port that the rate limit service listens on.
rateLimitInfraHTTPPort = 8080
// rateLimitInfraImage is the container image for the rate limit service.
rateLimitInfraImage = "envoyproxy/ratelimit:latest"
Copy link
Contributor

@zirain zirain Jan 30, 2023

Choose a reason for hiding this comment

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

TODO: make this configurable in EnvoyGateway.RateLimit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, rather than add a TODO comment in code, should be raised as a GH issue explaining the use cases where this is needed

Name: svc.Name,
}

if err := i.Client.Get(ctx, key, current); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we make L180-L197 reusable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like we'd move the complexity over to the util func - we could pass objects asClient.Object to it, which is fine, but we also do an equality check on obj.Spec, so we'd have to typecast it back to the orig obj type

Copy link
Contributor

Choose a reason for hiding this comment

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

address and refactor this later

Copy link
Contributor

@zirain zirain left a comment

Choose a reason for hiding this comment

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

LGTM

@arkodg arkodg merged commit 6f8b6fb into envoyproxy:main Jan 31, 2023
@arkodg arkodg deleted the rl-infra branch January 31, 2023 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants