Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

ECR Image Limits #63

Merged
merged 13 commits into from
Aug 26, 2016
Merged

ECR Image Limits #63

merged 13 commits into from
Aug 26, 2016

Conversation

emilymdubois
Copy link
Contributor

@emilymdubois emilymdubois commented Aug 9, 2016

Refs issue #44

This PR tracks the addition of the following:

  • Repository cleanup CLI tool
  • Tests
  • Documentation

cc @rclark @yhahn @emilymcafee

@rclark
Copy link
Contributor

rclark commented Aug 9, 2016

Had some chat discussion about this the other day, and I think it is worth considering:

  • providing the repository-cleanup script as a standalone CLI tool
  • building an alarm into ecs-conex that triggers when a repository has > 900 images in it
  • expecting cleanup to be done manually, ie no scheduled lambda function
  • (stretch-goal) the cleanup script could accept an array of tags representing images that it should absolutely not remove

@emilymdubois
Copy link
Contributor Author

@yhahn & @rclark, would love to get your eyes on this. I've set up the clean-up script to be a stand-alone CLI tool with the option to pass an image tag "blacklist" in. Noting that I left the actual deletion step commented out because it scared me, but tested on the ecs-conex-test repo and saw expected deletion behavior. I've added documentation here.

When I investigated a few days ago, there din't seem to be a way to alarm on ECR. Curious if we have creative ways to use CustomMetrics at our disposal to setup ECR registry size.

* `--maximum` The number of images to keep in the ECR registry. For example, if you want to keep 700 images in the ECR registry, you would wave the `--maximum=700` flag. The default value is 750.
* `--blacklist` A comma-separated list of imageTags not subject to deletion. For example, if you want to ensure that imageTag `<tag-1>` and `<tag-2>` are not deleted, you would wave the `--blacklist=<tag-1>,<tag-2>` flag.

You will need to have two environmental parameters set in your terminal:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol @emilymdubois always uses environmental ^_^

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha @yhahn what do the masses use?

@yhahn
Copy link
Member

yhahn commented Aug 26, 2016

@emilymdubois ✨ this is awesome -- gave it a roll and cleaned up a bunch of old images in a repo. I think you can totally enable the deletion and 🚢

@emilymdubois
Copy link
Contributor Author

Thank you @yhahn 🙇

@emilymdubois emilymdubois merged commit eccc802 into master Aug 26, 2016
@emilymdubois emilymdubois deleted the clean-up-your-image branch August 26, 2016 15:07
This was referenced Aug 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants