From 179778579f313d81e2494beca46b94e648d91e9a Mon Sep 17 00:00:00 2001 From: Huabing Zhao Date: Fri, 22 Nov 2024 07:49:41 +0000 Subject: [PATCH] decoup gateway status update Signed-off-by: Huabing Zhao --- internal/provider/kubernetes/predicates.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/provider/kubernetes/predicates.go b/internal/provider/kubernetes/predicates.go index d25ec2fb7d4..e135f16b476 100644 --- a/internal/provider/kubernetes/predicates.go +++ b/internal/provider/kubernetes/predicates.go @@ -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) return false } @@ -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), >w.Status) return false } } @@ -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