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
@@ -505,11 +507,15 @@ type SessionStorageConfig struct {
505
507
// RateLimitConfig defines rate limiting configuration for an MCP server.
506
508
// At least one of shared, perUser, or tools must be configured.
507
509
//
508
-
// +kubebuilder:validation:XValidation:rule="has(self.shared) || has(self.perUser) || (has(self.tools) && size(self.tools) > 0)",message="at least one of shared, perUser, or tools must be configured"
510
+
// +kubebuilder:validation:XValidation:rule="has(self.global) || has(self.shared) || has(self.perUser) || (has(self.tools) && size(self.tools) > 0)",message="at least one of global, shared, perUser, or tools must be configured"
509
511
//
510
512
//nolint:lll // CEL validation rules exceed line length limit
511
513
typeRateLimitConfigstruct {
512
-
// Shared is a token bucket shared across all users for the entire server.
514
+
// Global is a token bucket shared across all users for the entire server.
515
+
// +optional
516
+
Global*RateLimitBucket`json:"global,omitempty"`
517
+
518
+
// Shared is a deprecated alias for Global. Use global instead.
513
519
// +optional
514
520
Shared*RateLimitBucket`json:"shared,omitempty"`
515
521
@@ -547,9 +553,9 @@ type RateLimitBucket struct {
547
553
}
548
554
549
555
// ToolRateLimitConfig defines rate limits for a specific tool.
550
-
// At least one of shared or perUser must be configured.
556
+
// At least one of global, shared, or perUser must be configured.
551
557
//
552
-
// +kubebuilder:validation:XValidation:rule="has(self.shared) || has(self.perUser)",message="at least one of shared or perUser must be configured"
558
+
// +kubebuilder:validation:XValidation:rule="has(self.global) || has(self.shared) || has(self.perUser)",message="at least one of global, shared, or perUser must be configured"
553
559
//
554
560
//nolint:lll // kubebuilder marker exceeds line length
555
561
typeToolRateLimitConfigstruct {
@@ -558,7 +564,11 @@ type ToolRateLimitConfig struct {
558
564
// +kubebuilder:validation:MinLength=1
559
565
Namestring`json:"name"`
560
566
561
-
// Shared token bucket for this specific tool.
567
+
// Global token bucket for this specific tool.
568
+
// +optional
569
+
Global*RateLimitBucket`json:"global,omitempty"`
570
+
571
+
// Shared is a deprecated alias for Global. Use global instead.
562
572
// +optional
563
573
Shared*RateLimitBucket`json:"shared,omitempty"`
564
574
@@ -567,6 +577,40 @@ type ToolRateLimitConfig struct {
567
577
PerUser*RateLimitBucket`json:"perUser,omitempty"`
568
578
}
569
579
580
+
// ToInternal converts the Kubernetes API rate limit config to the runtime-neutral representation.
0 commit comments