Skip to content

Commit 64a3a87

Browse files
committed
add multi-az routing support
- add MultiAz flag to enable multi-az routing for cluster span across different zones CRC-1963
1 parent d35fe7c commit 64a3a87

5 files changed

Lines changed: 32 additions & 0 deletions

File tree

api/routing/v1alpha1/envoybootstrapconfig_types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ type EnvoyBootstrapConfigSpec struct {
4242
// +kubebuilder:default=false
4343
// +optional
4444
ProxyProtocolEnabled bool `json:"proxyProtocolEnabled,omitempty"`
45+
// MultiAZ marks this Envoy fleet as the multi-AZ load balancer. When true,
46+
// the route-manager advertises this fact to Envoy via node metadata so that
47+
// zone-aware routing decisions can be made per-cluster via
48+
// QdrantClusterRouting.spec.multiAZ.
49+
// +kubebuilder:default=false
50+
// +optional
51+
MultiAZ bool `json:"multiAZ,omitempty"`
4552
}
4653

4754
// EnvoyBootstrapConfigStatus defines the observed state of EnvoyBootstrapConfig.

api/routing/v1alpha1/routing_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ type QdrantClusterRoutingSpec struct {
5959
// If true enable (proxy) access log for this qdrant cluster.
6060
// +optional
6161
EnableAccessLog *bool `json:"enableAccessLog,omitempty"`
62+
// MultiAZ is true when the Qdrant cluster spans multiple availability
63+
// zones and traffic should be kept same-zone where possible.
64+
// +kubebuilder:default=false
65+
// +optional
66+
MultiAZ bool `json:"multiAZ,omitempty"`
6267
}
6368

6469
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

charts/qdrant-kubernetes-api/templates/routing-crds/routing.qdrant.io_envoybootstrapconfigs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ spec:
6565
When set the Envoy runs in dedicated mode for this cluster.
6666
When nil it runs in shared mode.
6767
type: string
68+
multiAZ:
69+
default: false
70+
description: |-
71+
MultiAZ marks this Envoy fleet as the multi-AZ load balancer. When true,
72+
the route-manager advertises this fact to Envoy via node metadata so that
73+
zone-aware routing decisions can be made per-cluster via
74+
QdrantClusterRouting.spec.multiAZ.
75+
type: boolean
6876
proxyProtocolEnabled:
6977
default: false
7078
description: ProxyProtocolEnabled enables the PROXY protocol on Envoy

charts/qdrant-kubernetes-api/templates/routing-crds/routing.qdrant.io_qdrantclusterroutes.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ spec:
8888
The fully qualified domain name (also know as host).
8989
For shared routing this will be used for SNI resolving.
9090
type: string
91+
multiAZ:
92+
default: false
93+
description: |-
94+
MultiAZ is true when the Qdrant cluster spans multiple availability
95+
zones and traffic should be kept same-zone where possible. When true the
96+
route-manager enables zone-aware load balancing on the generated Envoy
97+
clusters so that requests prefer Qdrant pods in the same zone as the
98+
receiving Envoy pod. Defaults to false (current behaviour: flat
99+
round-robin across all zones).
100+
type: boolean
91101
nodeIndexes:
92102
description: NodeIndexes specifies the indexes of the individual nodes
93103
in the cluster.

docs/api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,7 @@ _Appears in:_
17371737
| --- | --- | --- | --- |
17381738
| `clusterID` _string_ | ClusterID identifies the Qdrant cluster this Envoy instance serves.<br />When set the Envoy runs in dedicated mode for this cluster.<br />When nil it runs in shared mode. | | Optional: \{\} <br /> |
17391739
| `proxyProtocolEnabled` _boolean_ | ProxyProtocolEnabled enables the PROXY protocol on Envoy listeners. | false | Optional: \{\} <br /> |
1740+
| `multiAZ` _boolean_ | MultiAZ marks this Envoy fleet as the multi-AZ load balancer. When true,<br />the route-manager advertises this fact to Envoy via node metadata so that<br />zone-aware routing decisions can be made per-cluster via<br />QdrantClusterRouting.spec.multiAZ. | false | Optional: \{\} <br /> |
17401741

17411742

17421743

@@ -1785,6 +1786,7 @@ _Appears in:_
17851786
| `nodeIndexes` _integer array_ | NodeIndexes specifies the indexes of the individual nodes in the cluster. | | |
17861787
| `allowedSourceRanges` _string array_ | AllowedSourceRanges specifies the allowed CIDR source ranges for the ingress. | | Optional: \{\} <br /> |
17871788
| `enableAccessLog` _boolean_ | If true enable (proxy) access log for this qdrant cluster. | | Optional: \{\} <br /> |
1789+
| `multiAZ` _boolean_ | MultiAZ is true when the Qdrant cluster spans multiple availability<br />zones and traffic should be kept same-zone where possible. When true the<br />route-manager enables zone-aware load balancing on the generated Envoy<br />clusters so that requests prefer Qdrant pods in the same zone as the<br />receiving Envoy pod. Defaults to false (current behaviour: flat<br />round-robin across all zones). | false | Optional: \{\} <br /> |
17881790

17891791

17901792

0 commit comments

Comments
 (0)