-
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
ECR repository/S3 Bucket of assets needs clean up #6692
Comments
What about exposing a field on Example:
|
That sounds reasonable. We want to change the "scanOnPush" property and add lifecycle rules to the repository. I do not see how this is currently configurable. |
Concurred - would also like to enable scanOnPush in addition to the lifecycle policy - retention policy too even! (Edit: looks like scan on push is automatically enabled for the cdk repository) |
Any update on this? |
The current way image assets work in the CDK implies that a single ECR repository is used for all asset images. You can use cdk-ecr-deployment in order to deploy image assets to a specific ECR repository in your control. As for garbage collecting images from the assets ECR repository, this is something we plan to add at some point as part of a broader garbage collection capability (applies to buckets as well). Please +1 this RFC if you want to see this prioritized: aws/aws-cdk-rfcs#64 |
At least could we have the |
With the new |
@rix0rrr is there any workaround for this? Our AWS bill is up significantly due to ECR storage. |
@jonathan-kosgei You might give https://github.com/jogold/cloudstructs/blob/master/src/toolkit-cleaner/README.md a try (see the linked RFC above for where I found this: aws/aws-cdk-rfcs#64 (comment)). That construct has worked well for me. |
Hello everyone! This issue seems quiet. Any feedback? |
No updates currently but there is a third party construct to help enable this for those that need something in the interim https://constructs.dev/packages/cloudstructs/v/0.6.18/api/ToolkitCleaner?lang=typescript For tracking a built in solution aws/aws-cdk-rfcs#64 is the place to watch. |
I've been needing this feature too. |
Closing in favor of aws/aws-cdk-rfcs#64 |
|
@evgenyka is the implementation planned on the roadmap and is there an ETA? Closing in favor of an RFC does not inspire a lot of confidence that this feature will be prioritised. |
Please +1 Garbage Collection RFC
Original title: (was Lifecycle support for DockerImageAssets)
It would be helpful to apply lifecycle rules for the ECR to which
DockerImageAsset
's are pushed to.Use Case
Right now CDK automatically defines the repository and keeps all previous images stored in there. Because of rapid prototyping this causes a lot of images to build up. In order to save cost on storing these images and to declutter the interface from old unused images it would be neat to be able to define a lifecycle for these images.
Proposed Solution
Ideally it would be possible to define lifecycle rules for the
DockerImageAsset
itself, but exposing theRepository
construct throughDockerImageAsset#repository
instead of the genericIRepository
interface would also work:This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: