-
Notifications
You must be signed in to change notification settings - Fork 355
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
fix: decoup gateway status updates from the reconciler #4767
base: main
Are you sure you want to change the base?
fix: decoup gateway status updates from the reconciler #4767
Conversation
Signed-off-by: Huabing Zhao <[email protected]>
1797785
to
8c84649
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4767 +/- ##
==========================================
+ Coverage 65.61% 65.64% +0.03%
==========================================
Files 211 211
Lines 31961 31981 +20
==========================================
+ Hits 20972 20995 +23
+ Misses 9750 9744 -6
- Partials 1239 1242 +3 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Signed-off-by: Huabing Zhao <[email protected]>
@@ -564,34 +592,3 @@ func (r *gatewayAPIReconciler) updateStatusForGateway(ctx context.Context, gtw * | |||
}), | |||
}) | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about
func (r *gatewayAPIReconciler) updateStatusForGateway(ctx context.Context, gtw *gwapiv1.Gateway) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect the call to updateStatusForGateway
from inside the predicate blocked the reconciler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't we deleting update status for gateway ?
were we deadlocking ? |
@@ -294,7 +294,7 @@ func (r *gatewayAPIReconciler) validateServiceForReconcile(obj client.Object) bo | |||
// Check if the Service belongs to a Gateway, if so, update the Gateway status. | |||
gtw := r.findOwningGateway(ctx, labels) | |||
if gtw != nil { | |||
r.updateStatusForGateway(ctx, gtw) | |||
r.resources.GatewayStatuses.Store(utils.NamespacedName(gtw), >w.Status) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not documented well, but the reason this existed, was so that this flow could update the Status.Address
field and Status.Conditions
while the other flow (published from Gateway API) would update Status.Conditions
wanted to highlight this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, will add a line in the comment to explain why need to send an update here and how the gateway address is updated.
Signed-off-by: Huabing Zhao <[email protected]>
2b2535b
to
8323c0f
Compare
Signed-off-by: Huabing Zhao <[email protected]>
91fe885
to
bb391aa
Compare
Signed-off-by: Huabing Zhao <[email protected]>
bb391aa
to
7a4c51e
Compare
d948846
to
0a1f8f2
Compare
Signed-off-by: Huabing Zhao <[email protected]>
0a1f8f2
to
e406088
Compare
Fixes: #4685
Release Note: Yes