Cluster Image Retention

Hi,

I changed the setting registry.image_retention_time to 30 days from 1 year as it quickly fills up with container images.

Is this retroactive? Is there a job that checks existing images stored and deletes them if they are older than 30 days? How does it work exactly?

Thanks.

Hi @simofacc ,

30 days means that your container image will stay available in your container registry 30 days. Which also mean that if you don’t redeploy an application within 30 days, your image will no longer be available for your cluster in case it does not have the image in its local cache.

One question: do you redeploy your apps at least once a week?

@Pierre_Mavro I let you respond to this one.

If the image does not exist, it will pull the code from the registry and recreate the image, right?

Yes, we are deploying almost every week, especially since many new Preview environments are created all the time as we have multiple applications. This adds up a lot, and although I couldn’t check correctly from 120GB, around 96GB of storage was used. It would be useful to see the resource stats of the cluster similar to how it’s displayed for the services, e.g. Number of nodes running, storage space used, and load balancer stats.

1 Like

If the image does not exist, it will pull the code from the registry and recreate the image, right?

Nope, in this case, your application will fail to start if the image is not present on the node anymore and as the image does not exist in the registry. The error message will be something like 'ErrImagePullBackOff`

You will need to re-trigger a deployment (qovery side) for us to be able to re-build the image from source and to push it again in the registry.