Skip to content

Commit 452b385

Browse files
committed
api: Add AvailabilityZones field to LoadBalancerSpec
Add support for configuring availability zones on load balancers to enable zone-redundant configurations for high availability. For internal load balancers, zones are set directly on the frontend IP configuration. For public load balancers, zones should be set on the associated public IP addresses. The field supports up to 3 zones and uses a set list type to prevent duplicates. Zones are immutable after creation per Azure platform requirements. Fixes #5709
1 parent e22796f commit 452b385

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

api/v1beta1/types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,14 @@ type LoadBalancerSpec struct {
364364
// BackendPool describes the backend pool of the load balancer.
365365
// +optional
366366
BackendPool BackendPool `json:"backendPool,omitempty"`
367+
// AvailabilityZones is a list of availability zones for the load balancer.
368+
// When specified for an internal load balancer, the frontend IP configuration
369+
// will be zone-redundant across the specified zones.
370+
// For public load balancers, this should be set on the associated public IP addresses instead.
371+
// +optional
372+
// +listType=set
373+
// +kubebuilder:validation:MaxItems=3
374+
AvailabilityZones []string `json:"availabilityZones,omitempty"`
367375

368376
LoadBalancerClassSpec `json:",inline"`
369377
}

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)