Skip to content

Commit

Permalink
use ordered lists
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso committed Jan 10, 2025
1 parent dbee71e commit 075d27b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/reconciler/contour/contour.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, ing *v1alpha1.Ingress) r
logger = logger.With(zap.Bool("have-endpoint-probe", haveEndpointProbe))

info := resources.ServiceNames(ctx, ing)
serviceNames := sets.KeySet(info)
serviceNames := sets.List(sets.KeySet(info))
serviceToProtocol := make(map[string]string, len(info))
logger = logger.With(zap.Strings("services", serviceNames.UnsortedList()))
logger = logger.With(zap.Strings("services", serviceNames))

// Establish the protocol for each Service, and ensure that their Endpoints are
// populated with Ready addresses before we reprogram Contour.
for _, name := range serviceNames.UnsortedList() {
for _, name := range serviceNames {
if err := r.tracker.TrackReference(tracker.Reference{
APIVersion: "v1",
Kind: "Service",
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/contour/resources/httpproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type ServiceInfo struct {
}

func (si *ServiceInfo) Visibilities() (vis []v1alpha1.IngressVisibility) {
for _, v := range si.RawVisibilities.UnsortedList() {
for _, v := range sets.List(si.RawVisibilities) {
vis = append(vis, v1alpha1.IngressVisibility(v))
}
return
Expand Down

0 comments on commit 075d27b

Please sign in to comment.