1
0
Fork 0

fix(rules): check numeric cpu limits

This commit is contained in:
ssube 2019-06-22 12:44:46 -05:00
parent 4112a1d778
commit aec3ea9e4e
1 changed files with 6 additions and 5 deletions

View File

@ -56,9 +56,7 @@ rules:
limits: limits:
type: object type: object
properties: properties:
cpu: cpu: &resources-cpu
type: string
pattern: "[0-9]+m"
# ensure the limits aren't *too* low # ensure the limits aren't *too* low
check: check:
@ -68,7 +66,10 @@ rules:
type: object type: object
properties: properties:
cpu: cpu:
type: string oneOf:
- type: number
minimum: 1
- type: string
pattern: "[1-9][0-9]{2,}m" pattern: "[1-9][0-9]{2,}m"
- name: kubernetes-deployment-replicas - name: kubernetes-deployment-replicas