Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cleaner instance to find unhealthy deployments #46

Merged
merged 1 commit into from
Feb 4, 2024
Merged

Conversation

gianlucam76
Copy link
Owner

This cleaner identifies and removes unhealthy Deployments in your Kubernetes cluster based on pod restarts.

Unhealthy: A Deployment is considered unhealthy if all its Pods have each container restarted at least 50 times.

Action: When an unhealthy Deployment is found, it will be automatically scaled down to zero replicas (effectively removing it).

Fixes #45

A Deployment is defined unhealthy if all of its Pods have
more than 50 restarts (i.e, each of its Pods have at least
one container with restartCount greater than 50).

Any such a Deployment instance is scaled down (i.e, spec.replicas
is set to zero).
@gianlucam76 gianlucam76 merged commit 87de7cd into main Feb 4, 2024
3 checks passed
@gianlucam76 gianlucam76 deleted the restarts branch February 4, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scaledown deployments if all pods have more than 1000 restarts
1 participant