Skip to content

Commit

Permalink
avoid overriding the gateway status from Gateway API translator
Browse files Browse the repository at this point in the history
Signed-off-by: Huabing Zhao <[email protected]>
  • Loading branch information
zhaohuabing committed Dec 11, 2024
1 parent c993159 commit f8f2e68
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/provider/kubernetes/predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,13 @@ func (r *gatewayAPIReconciler) updateGatewayStatus(gateway *gwapiv1.Gateway) {
//
// Since the status does not reflect the actual changed status, we need to delete it first
// to prevent it from being considered unchanged. This ensures that subscribers receive the update event.
r.resources.GatewayStatuses.Delete(utils.NamespacedName(gateway))
r.resources.GatewayStatuses.Store(utils.NamespacedName(gateway), &gateway.Status)
gwName := utils.NamespacedName(gateway)
status:= &gateway.Status
if existing, ok := r.resources.GatewayStatuses.Load(gwName); ok {
status = existing
}
r.resources.GatewayStatuses.Delete(gwName)
r.resources.GatewayStatuses.Store(gwName, status)
}

func (r *gatewayAPIReconciler) handleNode(obj client.Object) bool {
Expand Down

0 comments on commit f8f2e68

Please sign in to comment.