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

[FEATURE] Kill only pods which do have more then 1 sibling replica #469

Open
WolfspiritM opened this issue May 18, 2022 · 2 comments · May be fixed by #542
Open

[FEATURE] Kill only pods which do have more then 1 sibling replica #469

WolfspiritM opened this issue May 18, 2022 · 2 comments · May be fixed by #542

Comments

@WolfspiritM
Copy link

We're using chaoskube to kill random pods and also to "balance" our cluster.

We have many microservices that are running with more then one replica however we have a few services that can only run with 1 replica. Our monitoring checks the health of the pods by calling their web endpoint and notify us if the service is down.

It would be nice if chaoskube can be configured to only kill pods that belong to a deploymen/ReplicaSet with more then one other pod. I couldn't find any way to configure that.

As a workaround for now we're going to set a label for that pods to prevent them from being killed.

@linki
Copy link
Owner

linki commented May 18, 2022

Good idea.

I think that could be added fairly easily here:

filteredList = append(filteredList, util.RandomPodSubSlice(pods, 1)...)
by adding something like

if len(pods) <= 1 {
  continue
}

But we would need to write a test case to confirm that.

@MustafaSaber MustafaSaber linked a pull request May 19, 2023 that will close this issue
@MustafaSaber
Copy link

Hi 👋, created the PR for this. Would appreciate the feedback!

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 a pull request may close this issue.

3 participants