Skip to content

Commit 4ccd0f5

Browse files
committed
azure/services/loadbalancers: Remove deprecated field NumberOfProbes
Microsoft is retiring the numberOfProbes property in 2027. It is being replaced by probeThreshold. https://learn.microsoft.com/en-us/answers/questions/2104921/action-required-end-of-support-for-microsoft-azure
1 parent 44e0cd5 commit 4ccd0f5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

azure/services/loadbalancers/spec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ func getProbes(lbSpec LBSpec) []*armnetwork.Probe {
263263
Port: ptr.To[int32](lbSpec.APIServerPort),
264264
RequestPath: ptr.To(httpsProbeRequestPath),
265265
IntervalInSeconds: ptr.To[int32](15),
266-
NumberOfProbes: ptr.To[int32](4),
266+
ProbeThreshold: ptr.To[int32](1),
267267
},
268268
},
269269
}

azure/services/loadbalancers/spec_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ func newDefaultNodeOutboundLB() armnetwork.LoadBalancer {
208208
}
209209
}
210210

211-
func newSamplePublicAPIServerLB(verifyFrontendIP bool, verifyBackendAddressPools bool, verifyLBRules bool, verifyProbes bool, verifyOutboundRules bool) armnetwork.LoadBalancer {
211+
func newSamplePublicAPIServerLB(verifyFrontendIP bool, verifyBackendAddressPools bool, verifyLBRules bool, verifyThreshold bool, verifyOutboundRules bool) armnetwork.LoadBalancer {
212212
var subnet *armnetwork.Subnet
213213
var backendAddressPoolProps *armnetwork.BackendAddressPoolPropertiesFormat
214214
enableFloatingIP := ptr.To(false)
215-
numProbes := ptr.To[int32](4)
215+
probeThreshold := ptr.To[int32](4)
216216
idleTimeout := ptr.To[int32](4)
217217

218218
if verifyFrontendIP {
@@ -228,8 +228,8 @@ func newSamplePublicAPIServerLB(verifyFrontendIP bool, verifyBackendAddressPools
228228
if verifyLBRules {
229229
enableFloatingIP = ptr.To(true)
230230
}
231-
if verifyProbes {
232-
numProbes = ptr.To[int32](999)
231+
if verifyThreshold {
232+
probeThreshold = ptr.To[int32](999)
233233
}
234234
if verifyOutboundRules {
235235
idleTimeout = ptr.To[int32](1000)
@@ -289,7 +289,7 @@ func newSamplePublicAPIServerLB(verifyFrontendIP bool, verifyBackendAddressPools
289289
Port: ptr.To[int32](6443),
290290
RequestPath: ptr.To(httpsProbeRequestPath),
291291
IntervalInSeconds: ptr.To[int32](15),
292-
NumberOfProbes: numProbes, // Add to verify that Probes aren't overwritten on update
292+
ProbeThreshold: probeThreshold, // Add to verify that Probes aren't overwritten on update
293293
},
294294
},
295295
},
@@ -370,7 +370,7 @@ func newDefaultInternalAPIServerLB() armnetwork.LoadBalancer {
370370
Port: ptr.To[int32](6443),
371371
RequestPath: ptr.To(httpsProbeRequestPath),
372372
IntervalInSeconds: ptr.To[int32](15),
373-
NumberOfProbes: ptr.To[int32](4),
373+
ProbeThreshold: ptr.To[int32](1),
374374
},
375375
},
376376
},

0 commit comments

Comments
 (0)