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
Copy file name to clipboardExpand all lines: api/v1alpha1/clienttrafficpolicy_types.go
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -281,7 +281,8 @@ const (
281
281
282
282
// ClientIPDetectionSettings provides configuration for determining the original client IP address for requests.
283
283
//
284
-
// +kubebuilder:validation:XValidation:rule="!(has(self.xForwardedFor) && has(self.customHeader))",message="customHeader cannot be used in conjunction with xForwardedFor"
284
+
// Exactly one of XForwardedFor, CustomHeader, or DirectSourceIP must be set.
285
+
// +kubebuilder:validation:XValidation:rule="[has(self.xForwardedFor), has(self.customHeader), has(self.directSourceIP)].filter(x, x).size() == 1",message="exactly one of xForwardedFor, customHeader, or directSourceIP must be set"
285
286
typeClientIPDetectionSettingsstruct {
286
287
// XForwardedForSettings provides configuration for using X-Forwarded-For headers for determining the client IP address.
287
288
//
@@ -294,8 +295,25 @@ type ClientIPDetectionSettings struct {
0 commit comments