Skip to content

Commit e9ceb28

Browse files
committed
compact duplicate external hostnames
1 parent f6587e5 commit e9ceb28

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/operator/imageconfig.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"fmt"
66
"reflect"
7+
"slices"
78
"sort"
89
"strings"
910
"time"
@@ -279,6 +280,9 @@ func (icc *ImageConfigController) getRouteHostnames() ([]string, error) {
279280
// downstream controllers that watch this array
280281
sort.Strings(routeNames)
281282

283+
// remove duplicates
284+
routeNames = slices.Compact(routeNames)
285+
282286
// make sure the default route hostname comes first in the list because the
283287
// first entry will be used as the public repository hostname by the cluster
284288
// configuration

0 commit comments

Comments
 (0)