Skip to content

Commit

Permalink
decoup gateway status update
Browse files Browse the repository at this point in the history
Signed-off-by: Huabing Zhao <[email protected]>
  • Loading branch information
zhaohuabing committed Nov 22, 2024
1 parent 71c0b54 commit 1797785
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/provider/kubernetes/predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -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), &gtw.Status)
return false
}

Expand Down Expand Up @@ -528,7 +528,7 @@ func (r *gatewayAPIReconciler) validateObjectForReconcile(obj client.Object) boo
// Check if the obj 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), &gtw.Status)
return false
}
}
Expand Down Expand Up @@ -636,7 +636,7 @@ func (r *gatewayAPIReconciler) updateStatusForGatewaysUnderGatewayClass(ctx cont
}

for _, gateway := range gateways.Items {
r.updateStatusForGateway(ctx, &gateway)
r.resources.GatewayStatuses.Store(utils.NamespacedName(&gateway), &gateway.Status)
}

return nil
Expand Down

0 comments on commit 1797785

Please sign in to comment.