-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(aws-cdk-lib/aws-ecr): LifecycleRule not working properly (?) #28885
Comments
@ValchanOficial I don't think, it is an issue, if you give maxImageAge: 30 then it will delete all images after 30 days, please remove your rule |
But I don't want to keep old images, only the latest 2 images |
Your first two rules will contain only 2 latest images for each tags. you do not required |
Thank you @ayush-shah-1501 for the feedback. |
Thank you, I will try this |
https://docs.aws.amazon.com/AmazonECR/latest/userguide/lifecycle_policy_examples.html |
|
Describe the bug
maxImageAge is deleting all images, including images to be retained
I want to keep the latest 2 images from each tag and from each package
There is a way to say which package is when I create a
new ecr.Repository
?Expected Behavior
keep images from maxImageCount
If I have 3 packages - Shoud be kept 2 images from each one - Total: 6
And so on
Current Behavior
All images are being deleted
Reproduction Steps
Code:
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
^2.93.0
Framework Version
No response
Node.js Version
18.16.0-alpine
OS
Linux
Language
TypeScript
Language Version
^5.1.6
Other information
It's a monorepo
The text was updated successfully, but these errors were encountered: