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

Discard Status before publishing in provider #1455

Merged
merged 2 commits into from May 30, 2023

Conversation

arkodg
Copy link
Contributor

@arkodg arkodg commented May 26, 2023

  • Discard the Status of the Gateway and xRoute resources before saving them in the watchable layer. This reduces the memory consumption within watchable / lesser things to cache. Its safe to discard the status since it is always recomputed by the gateway-api layer, and only written back into the K8s API Server if something, other than the LastTransitionTime has changed.

Fixes: #1370

* Discard the Status of the Gateway and xRoute resources
before saving them in the watchable layer. This reduces
the memory consumption within watchable / lesser things to
cache. Its safe to discard the status since it is always
recomputed by the gateway-api layer, and only written back
into the K8s API Server if something, other than the
`LastTransitionTime` has changed.

Fixes: envoyproxy#1370

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg requested a review from a team as a code owner May 26, 2023 19:50
@codecov
Copy link

codecov bot commented May 26, 2023

Codecov Report

Merging #1455 (bbdccce) into main (fbb2e17) will increase coverage by 0.07%.
The diff coverage is 43.75%.

@@            Coverage Diff             @@
##             main    #1455      +/-   ##
==========================================
+ Coverage   61.43%   61.51%   +0.07%     
==========================================
  Files          79       79              
  Lines       11439    11455      +16     
==========================================
+ Hits         7028     7046      +18     
- Misses       3949     3951       +2     
+ Partials      462      458       -4     
Impacted Files Coverage Δ
internal/provider/kubernetes/routes.go 35.43% <40.00%> (+0.19%) ⬆️
internal/provider/kubernetes/controller.go 50.55% <100.00%> (+0.94%) ⬆️

... and 1 file with indirect coverage changes

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

it would be better if there's a benchmark test.

@arkodg
Copy link
Contributor Author

arkodg commented May 30, 2023

/retest

Copy link
Member

@chauhanshubham chauhanshubham left a comment

Choose a reason for hiding this comment

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

thanks

@arkodg arkodg merged commit af71fef into envoyproxy:main May 30, 2023
17 of 18 checks passed
@arkodg arkodg deleted the reset-status branch May 30, 2023 17:41
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.

Pass xRoute Spec object instead of entire xRoute object using watchable
4 participants