ecr-cleanup
Helm chartv0.1.1App 0.1.5
A Helm chart to run ecr cleanup controller
About this chart
ECR Cleanup
Cleans up unused ECR images using this
Config
| Parameter | Description | Default | Required |
|---|---|---|---|
controller.dryRun | false | yes | |
controller.interval | 60 | yes | |
controller.maxImages | 900 | yes | |
controller.namespaces | default | yes | |
controller.region | us-east-1 | yes | |
controller.repos | sudermanjr-test | yes | |
controller.registryID | "" | no | |
controller.verbosity | 1 | yes | |
fullnameOverride | | no | |
image.pullPolicy | Always | no | |
image.repository | danielfm/kube-ecr-cleanup-controller | no | |
image.tag | 0.1.3 | no | |
nameOverride | | no | |
nodeSelector | {} | no | |
rbac.create | True | no | |
replicaCount | 1 | no | |
resources.limits.cpu | 100m | no | |
resources.limits.memory | 128Mi | no | |
resources.requests.cpu | 100m | no | |
resources.requests.memory | 128Mi | no | |
tolerations | [] | no | |
affinity | {} | no |
AWS Policy
The following IAM policy is needed for the controller to work.
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "${POLICYNAME}",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::${ACCOUNT_ID}:role/${ROLENAME}"
]
},
"Action": [
"ecr:BatchDeleteImage",
"ecr:BatchGetImage",
"ecr:DescribeImages",
"ecr:ListImages"
]
}
]
}
Deploy ecr-cleanup with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ecr-cleanup on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartecr-cleanup is pinned at v0.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply