Skip to content

Commit

Permalink
fix store order
Browse files Browse the repository at this point in the history
Signed-off-by: Karol Szwaj <karol.szwaj@gmail.com>
  • Loading branch information
cnvergence committed Feb 16, 2024
1 parent 20f5f8c commit 21970e0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions internal/provider/kubernetes/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,6 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques
return reconcile.Result{}, err
}

// The Store is triggered even when there are no Gateways associated to the
// GatewayClass. This would happen in case the last Gateway is removed and the
// Store will be required to trigger a cleanup of envoy infra resources.
r.resources.GatewayAPIResources.Store(string(r.classController), resourcesMap.DeepCopy())

if len(resourcesMap[acceptedGC.Name].Gateways) == 0 {
r.log.Info("No gateways found for accepted gatewayclass")

Expand All @@ -367,6 +362,10 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques
}
}
}
// The Store is triggered even when there are no Gateways associated to the
// GatewayClass. This would happen in case the last Gateway is removed and the
// Store will be required to trigger a cleanup of envoy infra resources.
r.resources.GatewayAPIResources.Store(string(r.classController), resourcesMap.DeepCopy())

r.log.Info("reconciled gateways successfully")
return reconcile.Result{}, nil
Expand Down

0 comments on commit 21970e0

Please sign in to comment.