Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix: sort the endpoints to make sure the order is consistent
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Yang <[email protected]>
  • Loading branch information
reaver-flomesh committed Oct 12, 2023
1 parent dd6dc5e commit c50966e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions controllers/flb/service_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,12 @@ func (r *ServiceReconciler) getEndpoints(ctx context.Context, svc *corev1.Servic
}
}

// for each service key, sort the endpoints to make sure the order is consistent
for svcKey, eps := range result {
sort.Strings(eps)
result[svcKey] = eps
}

return result, nil
}

Expand Down

0 comments on commit c50966e

Please sign in to comment.