Skip to content

Commit

Permalink
Revert net.SortIPs usage
Browse files Browse the repository at this point in the history
net.SortIPs doesn't work with '<addr>:<port>' strings. Switch back to
standard functions

JIRA: OSPRH-9565
  • Loading branch information
gthiemonge committed Aug 20, 2024
1 parent 7d738db commit 312b017
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/amphoracontroller_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package controllers
import (
"context"
"fmt"
"sort"
"strings"
"time"

Expand All @@ -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"
Expand Down Expand Up @@ -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, ",")
Expand Down

0 comments on commit 312b017

Please sign in to comment.