Skip to content

Commit

Permalink
fix: fix always update svc (#991)
Browse files Browse the repository at this point in the history
fix #982
Signed-off-by: Rory Z <[email protected]>
  • Loading branch information
Rory-Z authored Jan 8, 2024
1 parent d6908b6 commit ee2c62d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apis/apps/v2beta1/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package v2beta1
import (
"fmt"
"net"
"sort"
"strconv"
"strings"

Expand Down Expand Up @@ -231,6 +232,10 @@ func GetDashboardServicePort(hoconString string) ([]corev1.ServicePort, error) {
})
}

sort.Slice(dashboardSvcPortList, func(i, j int) bool {
return dashboardSvcPortList[i].Name < dashboardSvcPortList[j].Name
})

return dashboardSvcPortList, nil
}

Expand Down Expand Up @@ -355,6 +360,10 @@ func GetListenersServicePorts(hoconString string) ([]corev1.ServicePort, error)
}
}

sort.Slice(svcPorts, func(i, j int) bool {
return svcPorts[i].Name < svcPorts[j].Name
})

return svcPorts, nil
}

Expand Down

0 comments on commit ee2c62d

Please sign in to comment.