From 275ac43a4d2b6c5d76b0fbd0a91cd6a4154af887 Mon Sep 17 00:00:00 2001 From: "ske-renovate-ce[bot]" <163154779+ske-renovate-ce[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 10:11:54 +0000 Subject: [PATCH 1/2] Update module github.com/stackitcloud/stackit-sdk-go/services/loadbalancer to v1.14.0 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3eec4430..2c50e2c0 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/spf13/pflag v1.0.10 github.com/stackitcloud/stackit-sdk-go/core v0.26.0 github.com/stackitcloud/stackit-sdk-go/services/iaas v1.12.0 - github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.13.0 + github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.14.0 go.uber.org/mock v0.6.0 golang.org/x/sync v0.20.0 golang.org/x/sys v0.45.0 diff --git a/go.sum b/go.sum index 2ec9e228..3f64851e 100644 --- a/go.sum +++ b/go.sum @@ -188,8 +188,8 @@ github.com/stackitcloud/stackit-sdk-go/core v0.26.0 h1:jQEb9gkehfp6VCP6TcYk7BI10 github.com/stackitcloud/stackit-sdk-go/core v0.26.0/go.mod h1:WU1hhxnjXw2EV7CYa1nlEvNpMiRY6CvmIOaHuL3pOaA= github.com/stackitcloud/stackit-sdk-go/services/iaas v1.12.0 h1:H4V3H8qSKOaOalIrf4nAPDHhXnHYGs6SDGuK8Zj41Zo= github.com/stackitcloud/stackit-sdk-go/services/iaas v1.12.0/go.mod h1:Ts06id0KejUlQWbpR+/rm+tKng6QkTuFV1VQTPJ4dA4= -github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.13.0 h1:UuLNwFHjJCpL11y4F7B9oBKtZkxpu01VkNPILNkpex4= -github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.13.0/go.mod h1:+Ld3dn648I+YKcBV3fEkYpDSr3fel421+LurJGywSBs= +github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.14.0 h1:1dvL7tX91ziklayQmOupniE3jM4D5Nbtc0auNcx2p18= +github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v1.14.0/go.mod h1:+Ld3dn648I+YKcBV3fEkYpDSr3fel421+LurJGywSBs= github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.23.0 h1:u2C3oHNcc41Ba5cUqSPuqviDrYSRhpaC5+ELbuHHdwM= github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.23.0/go.mod h1:NEz3f+GV5G++BE9/MmZCsXJyCih7jtg0pZuSyG2sLEs= github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= From 5813cd040146e70409a023ef425b244ef5f7484f Mon Sep 17 00:00:00 2001 From: Maximilian Geberl Date: Thu, 28 May 2026 08:31:34 +0200 Subject: [PATCH 2/2] Update Loadbalancer enums --- pkg/ccm/loadbalancer.go | 11 ++++--- pkg/ccm/loadbalancer_spec.go | 29 ++++++++---------- pkg/ccm/loadbalancer_spec_test.go | 50 ++++++++++++++----------------- pkg/ccm/loadbalancer_test.go | 13 ++++---- 4 files changed, 47 insertions(+), 56 deletions(-) diff --git a/pkg/ccm/loadbalancer.go b/pkg/ccm/loadbalancer.go index 46f485e1..c75b61c3 100644 --- a/pkg/ccm/loadbalancer.go +++ b/pkg/ccm/loadbalancer.go @@ -9,7 +9,6 @@ import ( stackitconfig "github.com/stackitcloud/cloud-provider-stackit/pkg/stackit/config" loadbalancer "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer/v2api" - lbwait "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer/v2api/wait" corev1 "k8s.io/api/core/v1" "k8s.io/client-go/tools/record" cloudprovider "k8s.io/cloud-provider" @@ -159,7 +158,7 @@ func (l *LoadBalancer) EnsureLoadBalancer( //nolint:gocyclo // not really comple PrivateAddress: spec.PrivateAddress, Region: spec.Region, Labels: spec.Labels, - Status: spec.Status, + Status: new(loadbalancer.UpdateLoadBalancerPayloadStatus(spec.GetStatus())), TargetPools: spec.TargetPools, Version: spec.Version, } @@ -179,10 +178,10 @@ func (l *LoadBalancer) EnsureLoadBalancer( //nolint:gocyclo // not really comple } } - if lb.Status != nil && *lb.Status == lbwait.LOADBALANCERSTATUS_ERROR { + if lb.Status != nil && *lb.Status == loadbalancer.LOADBALANCERSTATUS_STATUS_ERROR { return nil, fmt.Errorf("the load balancer is in an error state") } - if lb.Status == nil || *lb.Status != lbwait.LOADBALANCERSTATUS_READY { + if lb.Status == nil || *lb.Status != loadbalancer.LOADBALANCERSTATUS_STATUS_READY { return nil, api.NewRetryError("waiting for load balancer to become ready. This error is normal while the load balancer starts.", retryDuration) } @@ -222,7 +221,7 @@ func (l *LoadBalancer) createLoadBalancer(ctx context.Context, clusterName strin return nil, createErr } - if lb.Status == nil || *lb.Status != lbwait.LOADBALANCERSTATUS_READY { + if lb.Status == nil || *lb.Status != loadbalancer.LOADBALANCERSTATUS_STATUS_READY { return nil, api.NewRetryError("waiting for load balancer to become ready. This error is normal while the load balancer starts.", retryDuration) } @@ -275,7 +274,7 @@ func (l *LoadBalancer) EnsureLoadBalancerDeleted( return nil case err != nil: return err - case lb.Status != nil && *lb.Status == lbwait.LOADBALANCERSTATUS_TERMINATING: + case lb.Status != nil && *lb.Status == loadbalancer.LOADBALANCERSTATUS_STATUS_TERMINATING: return nil } diff --git a/pkg/ccm/loadbalancer_spec.go b/pkg/ccm/loadbalancer_spec.go index 3f7d1f38..b957bdd1 100644 --- a/pkg/ccm/loadbalancer_spec.go +++ b/pkg/ccm/loadbalancer_spec.go @@ -9,8 +9,6 @@ import ( "time" stackitconfig "github.com/stackitcloud/cloud-provider-stackit/pkg/stackit/config" - //nolint:staticcheck // Temporary workaround: v2api OpenAPI generator currently misses enum constants. - lbLegacy "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer" loadbalancer "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer/v2api" corev1 "k8s.io/api/core/v1" @@ -248,7 +246,7 @@ func getPlanID(service *corev1.Service) (planID *string, msgs []string, err erro // The property name will be empty and must be set by the caller to produce a valid payload for the API. // An error is returned if the service has invalid options. // -//nolint:gocyclo,funlen,staticcheck // Temporary workaround: v2api OpenAPI generator currently misses enum constants. +//nolint:gocyclo,funlen // main function to create a lb from a service, this includes many options and is therefore complex. func lbSpecFromService( service *corev1.Service, nodes []*corev1.Node, @@ -259,7 +257,7 @@ func lbSpecFromService( Options: &loadbalancer.LoadBalancerOptions{}, Networks: []loadbalancer.Network{ { - Role: new(string(lbLegacy.NETWORKROLE_LISTENERS_AND_TARGETS)), + Role: new(loadbalancer.NETWORKROLE_ROLE_LISTENERS_AND_TARGETS), NetworkId: &opts.NetworkID, }, }, @@ -268,17 +266,17 @@ func lbSpecFromService( if listenerNetwork := service.Annotations[listenerNetworkAnnotation]; listenerNetwork != "" { lb.Networks = []loadbalancer.Network{ { - Role: new(string(lbLegacy.NETWORKROLE_TARGETS)), + Role: new(loadbalancer.NETWORKROLE_ROLE_TARGETS), NetworkId: &opts.NetworkID, }, { - Role: new(string(lbLegacy.NETWORKROLE_LISTENERS)), + Role: new(loadbalancer.NETWORKROLE_ROLE_LISTENERS), NetworkId: &listenerNetwork, }, } } else { lb.Networks = []loadbalancer.Network{ { - Role: new(string(lbLegacy.NETWORKROLE_LISTENERS_AND_TARGETS)), + Role: new(loadbalancer.NETWORKROLE_ROLE_LISTENERS_AND_TARGETS), NetworkId: &opts.NetworkID, }, } @@ -503,22 +501,22 @@ func lbSpecFromService( name = fmt.Sprintf("port-%s-%d", strings.ToLower(string(port.Protocol)), port.Port) } - var protocol lbLegacy.ListenerProtocol + var protocol loadbalancer.ListenerProtocol var tcpOptions *loadbalancer.OptionsTCP var udpOptions *loadbalancer.OptionsUDP switch port.Protocol { case corev1.ProtocolTCP: if proxyProtocolEnableForPort(tcpProxyProtocolEnabled, tcpProxyProtocolPortFilter, port.Port) { - protocol = lbLegacy.LISTENERPROTOCOL_TCP_PROXY + protocol = loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP_PROXY } else { - protocol = lbLegacy.LISTENERPROTOCOL_TCP + protocol = loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP } tcpOptions = &loadbalancer.OptionsTCP{ IdleTimeout: new(fmt.Sprintf("%.0fs", tcpIdleTimeout.Seconds())), } case corev1.ProtocolUDP: - protocol = lbLegacy.LISTENERPROTOCOL_UDP + protocol = loadbalancer.LISTENERPROTOCOL_PROTOCOL_UDP udpOptions = &loadbalancer.OptionsUDP{ IdleTimeout: new(fmt.Sprintf("%.0fs", udpIdleTimeout.Seconds())), } @@ -530,7 +528,7 @@ func lbSpecFromService( DisplayName: &name, Port: new(port.Port), TargetPool: &name, - Protocol: new(string(protocol)), + Protocol: new(protocol), Tcp: tcpOptions, Udp: udpOptions, }) @@ -597,8 +595,7 @@ type resultImmutableChanged struct { // compareLBwithSpec checks whether the load balancer fulfills the specification. // If immutableChanged is not nil then spec differs from lb such that an update will fail. // Otherwise, fulfills will indicate whether an update is necessary. -// -//nolint:staticcheck // Temporary workaround: v2api OpenAPI generator currently misses enum constants. + func compareLBwithSpec(lb *loadbalancer.LoadBalancer, spec *loadbalancer.CreateLoadBalancerPayload) (fulfills bool, immutableChanged *resultImmutableChanged) { //nolint:gocyclo,funlen,lll // It is long but not complex. // If a mutable property has changed we must still check the rest of the object because if there is an immutable change it must always be returned. fulfills = true @@ -666,13 +663,13 @@ func compareLBwithSpec(lb *loadbalancer.LoadBalancer, spec *loadbalancer.CreateL if !cmp.PtrValEqual(x.TargetPool, y.TargetPool) { fulfills = false } - if (cmp.UnpackPtr(x.Protocol) == string(lbLegacy.LISTENERPROTOCOL_TCP) || cmp.UnpackPtr(x.Protocol) == string(lbLegacy.LISTENERPROTOCOL_TCP_PROXY)) && + if (cmp.UnpackPtr(x.Protocol) == loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP || cmp.UnpackPtr(x.Protocol) == loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP_PROXY) && !cmp.PtrValEqualFn(x.Tcp, y.Tcp, func(a, b loadbalancer.OptionsTCP) bool { return cmp.PtrValEqual(a.IdleTimeout, b.IdleTimeout) }) { fulfills = false } - if cmp.UnpackPtr(x.Protocol) == string(lbLegacy.LISTENERPROTOCOL_UDP) && !cmp.PtrValEqualFn(x.Udp, y.Udp, func(a, b loadbalancer.OptionsUDP) bool { + if cmp.UnpackPtr(x.Protocol) == loadbalancer.LISTENERPROTOCOL_PROTOCOL_UDP && !cmp.PtrValEqualFn(x.Udp, y.Udp, func(a, b loadbalancer.OptionsUDP) bool { return cmp.PtrValEqual(a.IdleTimeout, b.IdleTimeout) }) { fulfills = false diff --git a/pkg/ccm/loadbalancer_spec_test.go b/pkg/ccm/loadbalancer_spec_test.go index 864259fa..aa33cf35 100644 --- a/pkg/ccm/loadbalancer_spec_test.go +++ b/pkg/ccm/loadbalancer_spec_test.go @@ -9,15 +9,12 @@ import ( "github.com/onsi/gomega/types" stackitconfig "github.com/stackitcloud/cloud-provider-stackit/pkg/stackit/config" - //nolint:staticcheck // Temporary workaround: v2api OpenAPI generator currently misses enum constants. - lbLegacy "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer" loadbalancer "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer/v2api" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" ) -//nolint:staticcheck // Temporary workaround: v2api OpenAPI generator currently misses enum constants var _ = Describe("lbSpecFromService", func() { const ( externalAddress = "123.124.88.99" @@ -227,15 +224,15 @@ var _ = Describe("lbSpecFromService", func() { "Listeners": ConsistOf( MatchFields(IgnoreExtras, Fields{ "DisplayName": PointTo(Equal("http")), - "Protocol": PointTo(Equal(string(lbLegacy.LISTENERPROTOCOL_TCP_PROXY))), + "Protocol": PointTo(Equal(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP_PROXY)), }), MatchFields(IgnoreExtras, Fields{ "DisplayName": PointTo(Equal("http-alt")), - "Protocol": PointTo(Equal(string(lbLegacy.LISTENERPROTOCOL_TCP_PROXY))), + "Protocol": PointTo(Equal(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP_PROXY)), }), MatchFields(IgnoreExtras, Fields{ "DisplayName": PointTo(Equal("dns")), - "Protocol": PointTo(Equal(string(lbLegacy.LISTENERPROTOCOL_UDP))), + "Protocol": PointTo(Equal(loadbalancer.LISTENERPROTOCOL_PROTOCOL_UDP)), }), ), }))) @@ -262,15 +259,15 @@ var _ = Describe("lbSpecFromService", func() { "Listeners": ConsistOf( MatchFields(IgnoreExtras, Fields{ "DisplayName": PointTo(Equal("http")), - "Protocol": PointTo(Equal(string(lbLegacy.LISTENERPROTOCOL_TCP_PROXY))), + "Protocol": PointTo(Equal(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP_PROXY)), }), MatchFields(IgnoreExtras, Fields{ "DisplayName": PointTo(Equal("http-alt")), - "Protocol": PointTo(Equal(string(lbLegacy.LISTENERPROTOCOL_TCP_PROXY))), + "Protocol": PointTo(Equal(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP_PROXY)), }), MatchFields(IgnoreExtras, Fields{ "DisplayName": PointTo(Equal("https")), - "Protocol": PointTo(Equal(string(lbLegacy.LISTENERPROTOCOL_TCP))), + "Protocol": PointTo(Equal(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP)), }), ), }))) @@ -295,7 +292,7 @@ var _ = Describe("lbSpecFromService", func() { "Listeners": ConsistOf( MatchFields(IgnoreExtras, Fields{ "DisplayName": PointTo(Equal("http")), - "Protocol": PointTo(Equal(string(lbLegacy.LISTENERPROTOCOL_TCP))), + "Protocol": PointTo(Equal(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP)), }), ), }))) @@ -375,13 +372,13 @@ var _ = Describe("lbSpecFromService", func() { Expect(spec.Listeners).To(ConsistOf( MatchFields(IgnoreExtras, Fields{ "DisplayName": PointTo(Equal("http")), - "Protocol": PointTo(Equal(string(lbLegacy.LISTENERPROTOCOL_TCP))), + "Protocol": PointTo(Equal(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP)), "Port": PointTo(BeNumerically("==", 80)), "TargetPool": PointTo(Equal("http")), }), MatchFields(IgnoreExtras, Fields{ "DisplayName": PointTo(Equal("dns")), - "Protocol": PointTo(Equal(string(lbLegacy.LISTENERPROTOCOL_UDP))), + "Protocol": PointTo(Equal(loadbalancer.LISTENERPROTOCOL_PROTOCOL_UDP)), "Port": PointTo(BeNumerically("==", 53)), "TargetPool": PointTo(Equal("dns")), }), @@ -649,7 +646,7 @@ var _ = Describe("lbSpecFromService", func() { }), MatchFields(IgnoreExtras, Fields{ "DisplayName": PointTo(Equal("my-tcp-proxy-port")), - "Protocol": PointTo(Equal(string(lbLegacy.LISTENERPROTOCOL_TCP_PROXY))), + "Protocol": PointTo(Equal(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP_PROXY)), "Tcp": PointTo(MatchFields(IgnoreExtras, Fields{ "IdleTimeout": PointTo(Equal("900s")), })), @@ -1160,7 +1157,7 @@ var _ = Describe("lbSpecFromService", func() { Expect(err).NotTo(HaveOccurred()) Expect(spec.Networks).To(ConsistOf(MatchFields(IgnoreExtras, Fields{ "NetworkId": PointTo(Equal("my-network")), - "Role": PointTo(Equal(string(lbLegacy.NETWORKROLE_LISTENERS_AND_TARGETS))), + "Role": PointTo(Equal(loadbalancer.NETWORKROLE_ROLE_LISTENERS_AND_TARGETS)), }))) }) @@ -1176,11 +1173,11 @@ var _ = Describe("lbSpecFromService", func() { Expect(spec.Networks).To(ConsistOf( MatchFields(IgnoreExtras, Fields{ "NetworkId": PointTo(Equal("my-network")), - "Role": PointTo(Equal(string(lbLegacy.NETWORKROLE_TARGETS))), + "Role": PointTo(Equal(loadbalancer.NETWORKROLE_ROLE_TARGETS)), }), MatchFields(IgnoreExtras, Fields{ "NetworkId": PointTo(Equal("my-listener-network")), - "Role": PointTo(Equal(string(lbLegacy.NETWORKROLE_LISTENERS))), + "Role": PointTo(Equal(loadbalancer.NETWORKROLE_ROLE_LISTENERS)), }), )) }) @@ -1224,7 +1221,6 @@ type compareLBwithSpecTest struct { spec *loadbalancer.CreateLoadBalancerPayload } -//nolint:staticcheck // Temporary workaround: v2api OpenAPI generator currently misses enum constants var _ = DescribeTable("compareLBwithSpec", func(t *compareLBwithSpecTest) { fulfills, immutableChanged := compareLBwithSpec(t.lb, t.spec) @@ -1429,7 +1425,7 @@ var _ = DescribeTable("compareLBwithSpec", PrivateNetworkOnly: new(true), }, Listeners: []loadbalancer.Listener{ - {Protocol: new(string(lbLegacy.LISTENERPROTOCOL_TCP))}, + {Protocol: new(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP)}, }, }, spec: &loadbalancer.CreateLoadBalancerPayload{ @@ -1437,7 +1433,7 @@ var _ = DescribeTable("compareLBwithSpec", PrivateNetworkOnly: new(true), }, Listeners: []loadbalancer.Listener{ - {Protocol: new(string(lbLegacy.LISTENERPROTOCOL_TCP_PROXY))}, + {Protocol: new(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP_PROXY)}, }, }, }), @@ -1449,7 +1445,7 @@ var _ = DescribeTable("compareLBwithSpec", }, Listeners: []loadbalancer.Listener{ { - Protocol: new(string(lbLegacy.LISTENERPROTOCOL_TCP)), + Protocol: new(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP), Tcp: &loadbalancer.OptionsTCP{ IdleTimeout: new("60s"), }, @@ -1462,7 +1458,7 @@ var _ = DescribeTable("compareLBwithSpec", }, Listeners: []loadbalancer.Listener{ { - Protocol: new(string(lbLegacy.LISTENERPROTOCOL_TCP)), + Protocol: new(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP), Tcp: &loadbalancer.OptionsTCP{ IdleTimeout: new("120s"), }, @@ -1478,7 +1474,7 @@ var _ = DescribeTable("compareLBwithSpec", }, Listeners: []loadbalancer.Listener{ { - Protocol: new(string(lbLegacy.LISTENERPROTOCOL_UDP)), + Protocol: new(loadbalancer.LISTENERPROTOCOL_PROTOCOL_UDP), Udp: &loadbalancer.OptionsUDP{ IdleTimeout: new("60s"), }, @@ -1491,7 +1487,7 @@ var _ = DescribeTable("compareLBwithSpec", }, Listeners: []loadbalancer.Listener{ { - Protocol: new(string(lbLegacy.LISTENERPROTOCOL_UDP)), + Protocol: new(loadbalancer.LISTENERPROTOCOL_PROTOCOL_UDP), Udp: &loadbalancer.OptionsUDP{ IdleTimeout: new("120s"), }, @@ -1507,7 +1503,7 @@ var _ = DescribeTable("compareLBwithSpec", }, Listeners: []loadbalancer.Listener{ { - Protocol: new(string(lbLegacy.LISTENERPROTOCOL_TCP_PROXY)), + Protocol: new(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP_PROXY), Tcp: &loadbalancer.OptionsTCP{ IdleTimeout: new("60s"), }, @@ -1520,7 +1516,7 @@ var _ = DescribeTable("compareLBwithSpec", }, Listeners: []loadbalancer.Listener{ { - Protocol: new(string(lbLegacy.LISTENERPROTOCOL_TCP_PROXY)), + Protocol: new(loadbalancer.LISTENERPROTOCOL_PROTOCOL_TCP_PROXY), Tcp: &loadbalancer.OptionsTCP{ IdleTimeout: new("120s"), }, @@ -1595,7 +1591,7 @@ var _ = DescribeTable("compareLBwithSpec", }, Networks: []loadbalancer.Network{ { - Role: new(string(lbLegacy.NETWORKROLE_LISTENERS)), + Role: new(loadbalancer.NETWORKROLE_ROLE_LISTENERS), }, }, }, @@ -1605,7 +1601,7 @@ var _ = DescribeTable("compareLBwithSpec", }, Networks: []loadbalancer.Network{ { - Role: new(string(lbLegacy.NETWORKROLE_TARGETS)), + Role: new(loadbalancer.NETWORKROLE_ROLE_TARGETS), }, }, }, diff --git a/pkg/ccm/loadbalancer_test.go b/pkg/ccm/loadbalancer_test.go index e46c9082..f0c51f2f 100644 --- a/pkg/ccm/loadbalancer_test.go +++ b/pkg/ccm/loadbalancer_test.go @@ -9,7 +9,6 @@ import ( . "github.com/onsi/gomega" stackitconfig "github.com/stackitcloud/cloud-provider-stackit/pkg/stackit/config" loadbalancer "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer/v2api" - lbwait "github.com/stackitcloud/stackit-sdk-go/services/loadbalancer/v2api/wait" "go.uber.org/mock/gomock" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -117,7 +116,7 @@ var _ = Describe("LoadBalancer", func() { Name: spec.Name, Networks: spec.Networks, Options: spec.Options, - Status: new(lbwait.LOADBALANCERSTATUS_READY), + Status: new(loadbalancer.LOADBALANCERSTATUS_STATUS_READY), TargetPools: spec.TargetPools, Version: new("current-version"), } @@ -239,7 +238,7 @@ var _ = Describe("LoadBalancer", func() { Networks: spec.Networks, Options: spec.Options, PrivateAddress: spec.PrivateAddress, - Status: new(lbwait.LOADBALANCERSTATUS_READY), + Status: new(loadbalancer.LOADBALANCERSTATUS_STATUS_READY), TargetPools: spec.TargetPools, Version: new("current-version"), PlanId: new(p10), @@ -265,7 +264,7 @@ var _ = Describe("LoadBalancer", func() { Networks: spec.Networks, Options: spec.Options, PrivateAddress: spec.PrivateAddress, - Status: new(lbwait.LOADBALANCERSTATUS_READY), + Status: new(loadbalancer.LOADBALANCERSTATUS_STATUS_READY), TargetPools: spec.TargetPools, Version: new("current-version"), } @@ -323,7 +322,7 @@ var _ = Describe("LoadBalancer", func() { Networks: spec.Networks, Options: spec.Options, PrivateAddress: spec.PrivateAddress, - Status: new(lbwait.LOADBALANCERSTATUS_READY), + Status: new(loadbalancer.LOADBALANCERSTATUS_STATUS_READY), TargetPools: spec.TargetPools, Version: new("current-version"), } @@ -359,7 +358,7 @@ var _ = Describe("LoadBalancer", func() { Networks: spec.Networks, Options: spec.Options, PrivateAddress: spec.PrivateAddress, - Status: new(lbwait.LOADBALANCERSTATUS_READY), + Status: new(loadbalancer.LOADBALANCERSTATUS_STATUS_READY), TargetPools: spec.TargetPools, Version: new("current-version"), } @@ -411,7 +410,7 @@ var _ = Describe("LoadBalancer", func() { It("should finalize deletion if load balancer is state terminating", func() { mockClient.EXPECT().GetLoadBalancer(gomock.Any(), projectID, gomock.Any()).Return(&loadbalancer.LoadBalancer{ - Status: new(lbwait.LOADBALANCERSTATUS_TERMINATING), + Status: new(loadbalancer.LOADBALANCERSTATUS_STATUS_TERMINATING), }, nil) err := loadBalancer.EnsureLoadBalancerDeleted(context.Background(), clusterName, minimalLoadBalancerService())