1
0
Fork 0

fix: apply schema changes to data

This commit is contained in:
ssube 2019-06-23 23:00:01 -05:00
parent eb1fdd3f30
commit 03b3bfa2f4
2 changed files with 5 additions and 11 deletions

View File

@ -23,11 +23,8 @@ rules:
required: [cpu, memory]
properties:
cpu: &resources-cpu
oneOf:
- type: number
minimum: 1
- type: string
pattern: "[1-9][0-9]*m"
type: string
default: 500m
memory: &resources-memory
oneOf:
- type: number
@ -66,11 +63,8 @@ rules:
type: object
properties:
cpu:
oneOf:
- type: number
minimum: 1
- type: string
pattern: "[1-9][0-9]{2,}m"
type: string
default: 500m
- name: kubernetes-deployment-replicas
desc: deployments must specify a positive replica count

View File

@ -131,7 +131,7 @@ export async function main(argv: Array<string>): Promise<number> {
if (Array.isArray(itemDiff) && itemDiff.length > 0) {
logger.info({ diff: itemDiff, item, rule }, 'rule passed with modifications');
applyDiff(item, itemDiff);
applyDiff(item, itemCopy);
} else {
logger.info({ rule }, 'rule passed');
}