Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
Signed-off-by: Huabing Zhao <[email protected]>
  • Loading branch information
zhaohuabing committed Nov 23, 2024
1 parent fc97316 commit 2b2535b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/provider/kubernetes/predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ 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 {
// Trigger a status update for the Gateway.
// The status updater will check the service to get the addresses of the Gateway,
// and check the Deployment/DaemonSet to get the status of the Gateway workload.
r.resources.GatewayStatuses.Store(utils.NamespacedName(gtw), &gtw.Status)
return false
}
Expand Down Expand Up @@ -528,6 +531,9 @@ 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 {
// Trigger a status update for the Gateway.
// The status updater will check the service to get the addresses of the Gateway,
// and check the Deployment/DaemonSet to get the status of the Gateway workload.
r.resources.GatewayStatuses.Store(utils.NamespacedName(gtw), &gtw.Status)
return false
}
Expand Down

0 comments on commit 2b2535b

Please sign in to comment.