Skip to content

Reset status conditions in GatewayAPI translator#516

Merged
danehans merged 4 commits intoenvoyproxy:mainfrom
arkodg:reset-status-translator
Oct 7, 2022
Merged

Reset status conditions in GatewayAPI translator#516
danehans merged 4 commits intoenvoyproxy:mainfrom
arkodg:reset-status-translator

Conversation

@arkodg
Copy link
Contributor

@arkodg arkodg commented Oct 6, 2022

  • reset the conditions field within the listeners field (Gateway status) and the the parents field (HTTPRoute Status) before further setting any newer conditions so older conditons that are no longer true can be reset.

Fixes: #415

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

* reset the conditions field within the listeners field (Gateway status)
and the the parents field (HTTPRoute Status) before further setting any
newer conditions so older conditons that are no longer true can be
reset.

* Enhance the status updater to merge the listener and parents
conditions so existing older conditions that are same as the newer
ones (except the LastTransitionTime field) can be retained and writes
to the API Server can be mitigated

Fixes: envoyproxy#415

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg requested a review from a team as a code owner October 6, 2022 21:37
@arkodg arkodg marked this pull request as draft October 6, 2022 21:42
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg marked this pull request as ready for review October 6, 2022 23:03
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2022

Codecov Report

Merging #516 (cc05e31) into main (c059da0) will increase coverage by 0.24%.
The diff coverage is 85.00%.

@@            Coverage Diff             @@
##             main     #516      +/-   ##
==========================================
+ Coverage   62.57%   62.82%   +0.24%     
==========================================
  Files          41       41              
  Lines        4468     4479      +11     
==========================================
+ Hits         2796     2814      +18     
+ Misses       1528     1524       -4     
+ Partials      144      141       -3     
Impacted Files Coverage Δ
internal/provider/kubernetes/httproute.go 61.88% <0.00%> (-0.95%) ⬇️
internal/gatewayapi/contexts.go 77.38% <100.00%> (+4.22%) ⬆️
internal/gatewayapi/translator.go 91.16% <100.00%> (+0.03%) ⬆️
internal/provider/kubernetes/gateway.go 73.22% <100.00%> (+0.11%) ⬆️
internal/status/conditions.go 96.96% <100.00%> (+0.96%) ⬆️
internal/provider/kubernetes/gatewayclass.go 73.91% <0.00%> (-1.45%) ⬇️

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>
@arkodg arkodg marked this pull request as draft October 7, 2022 00:55
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg marked this pull request as ready for review October 7, 2022 01:39
@arkodg arkodg requested a review from skriss October 7, 2022 01:44
Copy link
Contributor

@danehans danehans left a comment

Choose a reason for hiding this comment

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

Note that lastTransitionTime for HTTPRoutes and Gateway listeners will still update when EG is restarted until #448 is fixed.

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.

HTTPRoute Status Not Updated After Adding Backend

3 participants