Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 0ae01c1

Browse files
committed
Add validation regex for metricname in CRD
Signed-off-by: Madalina Lazar <[email protected]>
1 parent 5e49d4d commit 0ae01c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

telemetry-aware-scheduling/deploy/tas-policy-crd.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ spec:
4444
properties:
4545
metricname:
4646
type: string
47+
# don't match if the following characters are not present
48+
# can't match \ or / as that is what TAS uses as keys in
49+
# the metric cache and \ is to breakdown Unicode characters
50+
pattern: '^[a-zA-Z0-9_-]+$'
4751
operator:
4852
type: string
4953
enum: ["Equals","LessThan","GreaterThan"]

0 commit comments

Comments
 (0)