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
// +k8s:validation:cel[0]:message="optionalFields can only be set when optionalMode is 'CUSTOM', and must be set when optionalMode is 'CUSTOM'"
40
42
// +optional
41
43
Logging*LoggingConfig`json:"logging,omitempty"`
42
44
}
@@ -57,7 +59,6 @@ type L4LBConfigList struct {
57
59
}
58
60
59
61
// LoggingConfig defines the parameters for LB logging.
60
-
// +kubebuilder:validation:XValidation:rule="has(self.optionalFields) && size(self.optionalFields) > 0 ? self.optionalMode == 'CUSTOM' : true",message="optionalFields can only be set when optionalMode is 'CUSTOM'"
61
62
// +k8s:openapi-gen=true
62
63
typeLoggingConfigstruct {
63
64
// Enabled allows toggling of Cloud Logging.
@@ -66,14 +67,14 @@ type LoggingConfig struct {
66
67
67
68
// SampleRate is the percentage of flows to log, from 0 to 1000000.
68
69
// 1000000 means 100% of packets are logged.
69
-
// +kubebuilder:validation:Minimum=0
70
-
// +kubebuilder:validation:Maximum=1000000
70
+
// +k8s:validation:Minimum=0
71
+
// +k8s:validation:Maximum=1000000
71
72
// +optional
72
73
SampleRate*int32`json:"sampleRate,omitempty"`
73
74
74
75
// OptionalMode defines which metadata fields to include in the logs.
0 commit comments