fix(rules): check numeric cpu limits
This commit is contained in:
parent
4112a1d778
commit
aec3ea9e4e
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue