Skip to content

Commit

Permalink
Add validation regex for metricname in CRD
Browse files Browse the repository at this point in the history
Signed-off-by: Madalina Lazar <[email protected]>
  • Loading branch information
madalazar committed Aug 9, 2023
1 parent 5e49d4d commit 0ae01c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions telemetry-aware-scheduling/deploy/tas-policy-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ spec:
properties:
metricname:
type: string
# don't match if the following characters are not present
# can't match \ or / as that is what TAS uses as keys in
# the metric cache and \ is to breakdown Unicode characters
pattern: '^[a-zA-Z0-9_-]+$'
operator:
type: string
enum: ["Equals","LessThan","GreaterThan"]
Expand Down

0 comments on commit 0ae01c1

Please sign in to comment.