1
0
Fork 0

rules: add meta-schema for rules

This commit is contained in:
ssube 2019-06-15 19:43:01 -05:00
parent f7b60495e0
commit 9de751b62b
2 changed files with 42 additions and 0 deletions

View File

@ -1,5 +1,6 @@
rules:
- name: kubernetes-resources
desc: containers must have complete resources specified
level: info
tags:
- cluster-health

41
rules/salty-dog.yml Normal file
View File

@ -0,0 +1,41 @@
rules:
- name: salty-dog-rule
desc: rules must be complete
level: info
tags:
- important
select: '$.rules[*]'
filter:
type: object
check:
type: object
additionalProperties: false
required:
# metadata
- name
- desc
- level
- tags
# data
- select
- filter
- check
properties:
name:
type: string
desc:
type: string
level:
type: string
tags:
type: array
items:
type: string
select:
type: string
filter:
type: object
check:
type: object