Last active
February 1, 2021 22:01
-
-
Save shcallaway/82b34a28ced2098757ca72923df1a1d7 to your computer and use it in GitHub Desktop.
Lifecycle policy that caps prod and stage images at 25 each and all others at 75 for a total of 125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules": [ | |
{ | |
"rulePriority": 10, | |
"description": "Cap production images at 25.", | |
"selection": { | |
"tagStatus": "tagged", | |
"countType": "imageCountMoreThan", | |
"tagPrefixList": [ | |
"prod" | |
], | |
"countNumber": 25 | |
}, | |
"action": { | |
"type": "expire" | |
} | |
}, | |
{ | |
"rulePriority": 20, | |
"description": "Cap stage images at 25.", | |
"selection": { | |
"tagStatus": "tagged", | |
"countType": "imageCountMoreThan", | |
"tagPrefixList": [ | |
"stage" | |
], | |
"countNumber": 25 | |
}, | |
"action": { | |
"type": "expire" | |
} | |
}, | |
{ | |
"rulePriority": 30, | |
"description": "Cap all images at 75.", | |
"selection": { | |
"tagStatus": "any", | |
"countType": "imageCountMoreThan", | |
"countNumber": 75 | |
}, | |
"action": { | |
"type": "expire" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment