Skip to content

Commit 54efa64

Browse files
Add +kubebuilder:validation:Minimum=1 to prevent zero or negative token limits.
1 parent 1ef22e3 commit 54efa64

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

deployment/base/maas-controller/crd/bases/maas.opendatahub.io_maassubscriptions.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ spec:
8585
limit:
8686
description: Limit is the maximum number of tokens allowed
8787
format: int64
88+
minimum: 1
8889
type: integer
8990
window:
9091
description: Window is the time window (e.g., "1m", "1h",

maas-controller/api/maas/v1alpha1/maassubscription_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ type ModelSubscriptionRef struct {
7575
// TokenRateLimit defines a token rate limit
7676
type TokenRateLimit struct {
7777
// Limit is the maximum number of tokens allowed
78+
// +kubebuilder:validation:Minimum=1
7879
Limit int64 `json:"limit"`
7980

8081
// Window is the time window (e.g., "1m", "1h", "24h")

0 commit comments

Comments
 (0)