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
// ScrapeInterval specifies the interval at which Prometheus should scrape the metrics.
339
+
// The interval must be at least 15 seconds (if using "Xs") and divisible by 5.
340
+
// If minutes ("Xm") are used, the value must be at least 1m.
341
+
//
342
+
//+kubebuilder:default:="60s"
343
+
//+kubebuilder:validation:Optional
344
+
//+kubebuilder:validation:XValidation:rule="self == '' || self.matches('^([0-9]+[sm])+$')",messageExpression="'Rejected: ' + self + ' as an invalid value. ScrapeInterval must be empty (default applies) or in the format of <number>s or <number>m.'"
345
+
//+kubebuilder:validation:XValidation:rule="self == '' || (self.endsWith('m') && int(self.split('m')[0]) >= 1) || (self.endsWith('s') && int(self.split('s')[0]) >= 15 && int(self.split('s')[0]) % 5 == 0)",messageExpression="'Rejected: ' + self + ' as an invalid value. ScrapeInterval must be at least 15s (if using <s>) and divisible by 5, or at least 1m (if using <m>).'"
0 commit comments