kube-ecr-tagger is a tool used to complement ECR lifecycles policies by adding a specified tag or tag prefix to all images from ECR that are currently used in your kubernetes cluster.
Docker images can be found in this Dockerhub repository.
- Working Kubernetes cluster
- IAM Role to tag images on ECR with at least the following policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecr:GetAuthorizationToken",
"ecr:BatchCheckLayerAvailability",
"ecr:GetDownloadUrlForLayer",
"ecr:DescribeImages",
"ecr:BatchGetImage",
"ecr:PutImage",
],
"Resource": "*"
}
]
}
Example manifests can in the manifests folder.
It contains a ServiceAccount, ClusterRole, ClusterRoleBinding and Deployment definitions.
make test
Install and run golanci-lint
make install-golangci-lint
make lint
Dynamically-linked binary:
make build
Statically-linked binary:
make build-static
Docker image:
make build-image