Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure/services/loadbalancers/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func getProbes(lbSpec LBSpec) []*armnetwork.Probe {
Port: ptr.To[int32](lbSpec.APIServerPort),
RequestPath: ptr.To(httpsProbeRequestPath),
IntervalInSeconds: ptr.To[int32](15),
NumberOfProbes: ptr.To[int32](4),
ProbeThreshold: ptr.To[int32](1),
},
},
}
Expand Down
12 changes: 6 additions & 6 deletions azure/services/loadbalancers/spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ func newDefaultNodeOutboundLB() armnetwork.LoadBalancer {
}
}

func newSamplePublicAPIServerLB(verifyFrontendIP bool, verifyBackendAddressPools bool, verifyLBRules bool, verifyProbes bool, verifyOutboundRules bool, modifications ...func(*armnetwork.LoadBalancer)) armnetwork.LoadBalancer {
func newSamplePublicAPIServerLB(verifyFrontendIP bool, verifyBackendAddressPools bool, verifyLBRules bool, verifyThreshold bool, verifyOutboundRules bool, modifications ...func(*armnetwork.LoadBalancer)) armnetwork.LoadBalancer {
var subnet *armnetwork.Subnet
var backendAddressPoolProps *armnetwork.BackendAddressPoolPropertiesFormat
enableFloatingIP := ptr.To(false)
numProbes := ptr.To[int32](4)
probeThreshold := ptr.To[int32](1)
idleTimeout := ptr.To[int32](4)

if verifyFrontendIP {
Expand All @@ -260,8 +260,8 @@ func newSamplePublicAPIServerLB(verifyFrontendIP bool, verifyBackendAddressPools
if verifyLBRules {
enableFloatingIP = ptr.To(true)
}
if verifyProbes {
numProbes = ptr.To[int32](999)
if verifyThreshold {
probeThreshold = ptr.To[int32](999)
}
if verifyOutboundRules {
idleTimeout = ptr.To[int32](1000)
Expand Down Expand Up @@ -321,7 +321,7 @@ func newSamplePublicAPIServerLB(verifyFrontendIP bool, verifyBackendAddressPools
Port: ptr.To[int32](6443),
RequestPath: ptr.To(httpsProbeRequestPath),
IntervalInSeconds: ptr.To[int32](15),
NumberOfProbes: numProbes, // Add to verify that Probes aren't overwritten on update
ProbeThreshold: probeThreshold, // Add to verify that Probes aren't overwritten on update
},
},
},
Expand Down Expand Up @@ -408,7 +408,7 @@ func newDefaultInternalAPIServerLB() armnetwork.LoadBalancer {
Port: ptr.To[int32](6443),
RequestPath: ptr.To(httpsProbeRequestPath),
IntervalInSeconds: ptr.To[int32](15),
NumberOfProbes: ptr.To[int32](4),
ProbeThreshold: ptr.To[int32](1),
},
},
},
Expand Down
Loading