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 "safe-to-evict" autoscaler annotations for components with emptyDir mounted #676

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

pkosiec
Copy link
Member

@pkosiec pkosiec commented Mar 17, 2022

Description

Changes proposed in this pull request:

  • Add "safe-to-evict" autoscaler annotations for components with emptyDir mounted

Prometheus, Alertmanager and Neo4j have emptyDir mounted which prevent them to scale down clusters that use Cluster Autoscaler, e.g. our long-running one on GCP:

Screenshot 2022-03-17 at 10 48 28

While I didn't see such errors for kubed, argo server and grafana, they also use emptyDir for cache, so I annotated them just to be safe.

Notes

If we upgraded to GKE 1.22 we wouldn't need such annotations on the pods:
https://cloud.google.com/kubernetes-engine/docs/release-notes#October_27_2021

There's already open task for that: #611

Testing

Run make dev-cluster and observe new annotations:

kubectl get po -n capact-system > /tmp/pods.yaml

Open the file in a text editor and verify that for all pods with emptyDir the annotation cluster-autoscaler.kubernetes.io/safe-to-evict: "true" is properly set.

Related links

@pkosiec pkosiec added bug Something isn't working area/ci Relates to CI labels Mar 17, 2022
@pkosiec pkosiec added the WIP Work in progress label Mar 17, 2022
@pkosiec pkosiec removed the WIP Work in progress label Mar 17, 2022
Copy link
Member

@mszostok mszostok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested with helm template. LGTM 👍

@pkosiec pkosiec merged commit a70888c into capactio:main Mar 17, 2022
@pkosiec pkosiec deleted the safe-to-evict branch March 17, 2022 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Relates to CI bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants