1
0
Fork 0

fix kubernetes rules

This commit is contained in:
ssube 2019-06-23 23:00:44 -05:00
parent 03b3bfa2f4
commit 67d2b59302
1 changed files with 12 additions and 6 deletions

View File

@ -23,8 +23,11 @@ rules:
required: [cpu, memory]
properties:
cpu: &resources-cpu
type: string
default: 500m
oneOf:
- type: number
minimum: 1
- type: string
pattern: "[1-9][0-9]*m"
memory: &resources-memory
oneOf:
- type: number
@ -53,7 +56,7 @@ rules:
limits:
type: object
properties:
cpu: *resources-cpu
cpu: &resources-cpu
# ensure the limits aren't *too* low
check:
@ -63,8 +66,11 @@ rules:
type: object
properties:
cpu:
type: string
default: 500m
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
@ -93,4 +99,4 @@ rules:
properties:
replica:
type: number
minimum: 1
minimum: 1