lint(rules): comment up the k8s rules
This commit is contained in:
parent
52095ed7ed
commit
494d9f1a95
|
@ -7,8 +7,6 @@ rules:
|
||||||
- important
|
- important
|
||||||
|
|
||||||
select: '$.spec.template.spec.containers[*]'
|
select: '$.spec.template.spec.containers[*]'
|
||||||
filter:
|
|
||||||
type: object
|
|
||||||
|
|
||||||
check:
|
check:
|
||||||
type: object
|
type: object
|
||||||
|
@ -47,6 +45,8 @@ rules:
|
||||||
- optional
|
- optional
|
||||||
|
|
||||||
select: '$.spec.template.spec.containers[*].resources'
|
select: '$.spec.template.spec.containers[*].resources'
|
||||||
|
|
||||||
|
# filter low-cpu resource limits
|
||||||
filter:
|
filter:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -57,6 +57,7 @@ rules:
|
||||||
type: string
|
type: string
|
||||||
pattern: "[0-9]{1,3}m"
|
pattern: "[0-9]{1,3}m"
|
||||||
|
|
||||||
|
# ensure the limits aren't *too* low
|
||||||
check:
|
check:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -68,12 +69,15 @@ rules:
|
||||||
pattern: "[0-9]{3}m"
|
pattern: "[0-9]{3}m"
|
||||||
|
|
||||||
- name: kubernetes-deployment-replicas
|
- name: kubernetes-deployment-replicas
|
||||||
desc: deployments must specify a replica count
|
desc: deployments must specify a positive replica count
|
||||||
level: info
|
level: info
|
||||||
tags:
|
tags:
|
||||||
- important
|
- important
|
||||||
|
|
||||||
|
# select the root of the document
|
||||||
select: '$'
|
select: '$'
|
||||||
|
|
||||||
|
# filter deployments
|
||||||
filter:
|
filter:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -81,6 +85,7 @@ rules:
|
||||||
type: string
|
type: string
|
||||||
const: Deployment
|
const: Deployment
|
||||||
|
|
||||||
|
# ensure replicas are greater than 0
|
||||||
check:
|
check:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
Loading…
Reference in New Issue