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:
type: object
properties:
cpu:
type: string
pattern: "[0-9]+m"
cpu: &resources-cpu
# ensure the limits aren't *too* low
check:
@ -68,8 +66,11 @@ rules:
type: object
properties:
cpu:
type: string
pattern: "[1-9][0-9]{2,}m"
oneOf:
- type: number
minimum: 1
- type: string
pattern: "[1-9][0-9]{2,}m"
- name: kubernetes-deployment-replicas
desc: deployments must specify a positive replica count