You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// +kubebuilder:validation:XValidation:rule="self.type == 'ConsistentHash' ? has(self.consistentHash) : !has(self.consistentHash)",message="If LoadBalancer type is consistentHash, consistentHash field needs to be set."
14
-
// +kubebuilder:validation:XValidation:rule="self.type in ['Random', 'ConsistentHash'] ? !has(self.slowStart) : true ",message="Currently SlowStart is only supported for RoundRobin and LeastRequest load balancers."
15
-
// +kubebuilder:validation:XValidation:rule="self.type == 'ConsistentHash' ? !has(self.zoneAware) : true ",message="Currently ZoneAware is only supported for LeastRequest, Random, and RoundRobin load balancers."
14
+
// +kubebuilder:validation:XValidation:rule="self.type == 'HostOverride' ? has(self.hostOverrideSettings) : !has(self.hostOverrideSettings)",message="If LoadBalancer type is HostOverride, hostOverrideSettings field needs to be set."
15
+
// +kubebuilder:validation:XValidation:rule="self.type in ['Random', 'ConsistentHash', 'HostOverride'] ? !has(self.slowStart) : true ",message="Currently SlowStart is only supported for RoundRobin and LeastRequest load balancers."
16
+
// +kubebuilder:validation:XValidation:rule="self.type in ['ConsistentHash', 'HostOverride'] ? !has(self.zoneAware) : true ",message="Currently ZoneAware is only supported for LeastRequest, Random, and RoundRobin load balancers."
// OverrideHostSource defines a source to get override host addresses from.
216
+
// +union
217
+
//
218
+
// +kubebuilder:validation:XValidation:rule="(has(self.header) && !has(self.metadata)) || (!has(self.header) && has(self.metadata))",message="Exactly one of header or metadata must be set."
219
+
typeOverrideHostSourcestruct {
220
+
// Header defines the header to get the override host addresses.
221
+
// The header value must specify at least one host in `IP:Port` format or multiple hosts in `IP:Port,IP:Port,...` format.
222
+
// For example `10.0.0.5:8080` or `[2600:4040:5204::1574:24ae]:80`.
223
+
// The IPv6 address is enclosed in square brackets.
224
+
//
225
+
// +optional
226
+
Header*string`json:"header,omitempty"`
227
+
228
+
// Metadata defines the metadata key to get the override host addresses from the request dynamic metadata.
229
+
// If set this field then it will take precedence over the header field.
230
+
//
231
+
// +optional
232
+
Metadata*MetadataKey`json:"metadata,omitempty"`
233
+
}
234
+
235
+
// MetadataKey defines the metadata key configuration for host override.
236
+
typeMetadataKeystruct {
237
+
// Key defines the metadata key.
238
+
//
239
+
// +kubebuilder:validation:MinLength=1
240
+
Keystring`json:"key"`
241
+
242
+
// Path defines the path within the metadata to extract the host addresses.
243
+
// Each path element represents a key in nested metadata structure.
244
+
//
245
+
// +optional
246
+
Path []MetadataKeyPath`json:"path,omitempty"`
247
+
}
248
+
249
+
// MetadataKeyPath defines a path element in the metadata structure.
250
+
typeMetadataKeyPathstruct {
251
+
// Key defines the key name in the metadata structure.
0 commit comments