diff --git a/go.mod b/go.mod index f97ecb9501..9a495d36f2 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,6 @@ require ( github.com/stretchr/testify v1.10.0 go.opentelemetry.io/otel v1.33.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 k8s.io/api v0.32.0 k8s.io/apimachinery v0.32.0 k8s.io/client-go v0.32.0 diff --git a/go.sum b/go.sum index bf05338062..0afd866863 100644 --- a/go.sum +++ b/go.sum @@ -458,8 +458,6 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= diff --git a/internal/k8s/controller.go b/internal/k8s/controller.go index 8e7ef8c8ef..41a338453b 100644 --- a/internal/k8s/controller.go +++ b/internal/k8s/controller.go @@ -20,18 +20,18 @@ import ( "context" "fmt" "log/slog" + "maps" "net" "os" + "slices" "strconv" "strings" "sync" "time" - "github.com/nginxinc/kubernetes-ingress/internal/telemetry" - "golang.org/x/exp/maps" - "github.com/nginxinc/kubernetes-ingress/internal/k8s/appprotect" "github.com/nginxinc/kubernetes-ingress/internal/k8s/appprotectdos" + "github.com/nginxinc/kubernetes-ingress/internal/telemetry" "k8s.io/client-go/informers" "k8s.io/client-go/rest" @@ -3147,7 +3147,7 @@ func (lbc *LoadBalancerController) getEndpointsForPortFromEndpointSlices(endpoin endpointSet[podEndpoint] = struct{}{} } } - return maps.Keys(endpointSet) + return slices.Collect(maps.Keys(endpointSet)) } endpoints := makePodEndpoints(targetPort, filterReadyEndpointsFrom(selectEndpointSlicesForPort(targetPort, endpointSlices))) diff --git a/pkg/apis/externaldns/validation/externaldns.go b/pkg/apis/externaldns/validation/externaldns.go index fa0e7db0eb..707e0935f5 100644 --- a/pkg/apis/externaldns/validation/externaldns.go +++ b/pkg/apis/externaldns/validation/externaldns.go @@ -3,10 +3,9 @@ package validation import ( "errors" "fmt" + "slices" "strings" - "golang.org/x/exp/slices" - v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/externaldns/v1" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field"