From 312b0170fcebd6ee5d58a50b6e23604548ae83e3 Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Tue, 20 Aug 2024 09:29:51 +0200 Subject: [PATCH] Revert net.SortIPs usage net.SortIPs doesn't work with ':' strings. Switch back to standard functions JIRA: OSPRH-9565 --- controllers/amphoracontroller_controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/amphoracontroller_controller.go b/controllers/amphoracontroller_controller.go index 3461a10a..4f533b6c 100644 --- a/controllers/amphoracontroller_controller.go +++ b/controllers/amphoracontroller_controller.go @@ -19,6 +19,7 @@ package controllers import ( "context" "fmt" + "sort" "strings" "time" @@ -30,7 +31,6 @@ import ( "github.com/openstack-k8s-operators/lib-common/modules/common/env" "github.com/openstack-k8s-operators/lib-common/modules/common/helper" "github.com/openstack-k8s-operators/lib-common/modules/common/labels" - "github.com/openstack-k8s-operators/lib-common/modules/common/net" nad "github.com/openstack-k8s-operators/lib-common/modules/common/networkattachment" "github.com/openstack-k8s-operators/lib-common/modules/common/tls" "github.com/openstack-k8s-operators/lib-common/modules/common/util" @@ -600,8 +600,8 @@ func (r *OctaviaAmphoraControllerReconciler) generateServiceConfigMaps( rsyslogIPAddresses = append(rsyslogIPAddresses, fmt.Sprintf("%s:514", val)) } } - ipAddresses = net.SortIPs(ipAddresses) - rsyslogIPAddresses = net.SortIPs(rsyslogIPAddresses) + sort.Strings(ipAddresses) + sort.Strings(rsyslogIPAddresses) ipAddressString := strings.Join(ipAddresses, ",") templateParameters["ControllerIPList"] = ipAddressString templateParameters["AdminLogTargetList"] = strings.Join(rsyslogIPAddresses, ",")