fix: apply schema changes to data
This commit is contained in:
parent
eb1fdd3f30
commit
03b3bfa2f4
|
@ -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
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue