You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What we did:
We introduced LifeCyclePolicy into ECR to avoid having cached really old images.
We set this to keep 3 latest tags, which in effect has removed a lot of tags including old ones and currently used.
After cleanup k8s-image-swapper still recognized image as existing in ECR and mutate pod to start with ECR cached image, which ends up with ImagePullBackOff
What is the issue:
Seems that there is some cache for skopeo, which see image even if it not exists.
After deleting/recreating image-swapper pod situation get backs to normal.
Steps to reproduce:
Start deployment with nginx:1:14.2
Wait until k8s-image-swapper will cache image
Restart nginx deployment - it will be started with cached image
Remove image tag from ECR
Restart nginx deployment - it will fall into ImagePullBackOff
An internal cache is used to reduce the number of requests to the AWS API by keeping track of existing images. The cache does not expire by time but by number of items and cache size, e.g. if the cache gets too large items are purged.
The cache allows to set a TTL per item, which I think would be useful in this case. I will set the TTL to 24h by default.
NOTE: TTL is nice, but doesn't solve the problem completely. Having TTL configurable (even as 1 hour or less) would be nice, checking if final pod doesn't suffer from pull errors might also help.
What we did:
We introduced LifeCyclePolicy into ECR to avoid having cached really old images.
We set this to keep 3 latest tags, which in effect has removed a lot of tags including old ones and currently used.
After cleanup k8s-image-swapper still recognized image as existing in ECR and mutate pod to start with ECR cached image, which ends up with ImagePullBackOff
What is the issue:
Seems that there is some cache for skopeo, which see image even if it not exists.
After deleting/recreating image-swapper pod situation get backs to normal.
Steps to reproduce:
Logs:
Additional info:
Prove that image-tag is missing
also running skopeo inspect from image-swapper pod:
W/A:
Restart image-swapper Deployment
The text was updated successfully, but these errors were encountered: