Feature request: max image age
Hi,
We have a few applications that are set to run as "latest" image ( I know, we should not - but we do). Once written to ECR, this "latest" will stay there forever ... so it will soon become "not latest".
From reading https://github.com/estahn/k8s-image-swapper/issues/843 , it seems some users have decided to wipe all images via ECR policy to force this - which introduces quite some issues (PullImageBackOff namely).
What about adding a new setting like "max_image_days" (default to "0" for infinite, to avoid changing current deployments) ? then k8s-image-swapper could just push again when it reaches that max_age.
This should already be handled if you set imagePullPolicy: Always - then the copier will not just use existing images, it'll always check the upstream image to see if there's a newer version to copy
https://github.com/estahn/k8s-image-swapper/blob/13d52179de724fc437b6e7118b4f4d29a053ab7b/pkg/webhook/image_copier.go#L92
Yes, but then, that counts as 1 dockerhub pull; which is now limited to 10 per hour