Support disabling default rules @Benbentwo (#149)
## whatAdds a variable with defaults to allow disabling the default rules.
why
As part of #146 we added custom lifecycle policies. Now there's a problem where our default rules conflict or are forced at certain points in certain orders relative to our custom lifecycle policies. We want to be able to disable them if they don't meet our needs.
references
e.g.
default_lifecycle_rules_settings:
untagged_image_rule:
enabled: false
remove_old_image_rule:
enabled: false
custom_lifecycle_rules:
- selection:
tagStatus: "tagged"
countType: "imageCountMoreThan"
countNumber: 1000
tagPrefixList: ["prod-"]
description: "Expire images older than 1000 for all tags starting with prod-"
action:
type: "expire"
- selection:
tagStatus: "tagged"
countType: "imageCountMoreThan"
countNumber: 1000
tagPrefixList: ["staging-"]
description: "Expire images older than 1000 for all tags starting with staging-"
action:
type: "expire"
- selection:
tagStatus: "tagged"
countType: "imageCountMoreThan"
countNumber: 1000
tagPrefixList: ["dev-"]
description: "Expire images older than 1000 for all tags starting with dev-"
action:
type: "expire"
results in just the custom_lifecycle_rules
being created. No default behavior change