deckhouse / k8s-image-availability-exporter

Alert if an image used in Kubernetes cannot be pulled from container registry
Apache License 2.0
212 stars 25 forks source link

Add option to force docker image check for disable/suspend workloads #74

Closed verdel closed 8 months ago

verdel commented 11 months ago

Currently the exporter does not check the availability of docker image for disable/suspend workloads. It may be worth adding a CLI option that will bypass the workload check and force docker image check for disable/suspend workloads.

We use k8s-image-availability-exporter not only to get metrics about docker image availability in our registry. The exporter checks the availability of docker images deployed in the cluster. The docker registry event log constantly adds events about access to docker image and docker registry garbage collector does not delete these docker images.

We also use Keda to turn off unused test environments. Keda scales Deployments to 0 replicas. After that exporter stop to check docker image of disabled deployment. After some time, docker registry garbage collector delete docker image.

We would like to avoid this.