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

Adds support for terminating multiple pods per run #154

Merged
merged 6 commits into from Nov 7, 2019

Conversation

@pims
Copy link
Contributor

pims commented Nov 4, 2019

The configuration flag --max-kill specifies the maximum number of pods to be terminated per run,
with a default value of 1, to maintain existing behavior.

Adds a new filter: filterByOwnerReference to avoid terminating multiple pods belonging to the
same owner. This prevents pods deployed together to be terminated at the same time.

In practice, no more than 1 pod per owner will be terminated during each run. All pods without an owner
reference are eligible to be terminated in the same batch (up to --max-kill value)

This a PoC to address #152

@linki if you think this is a good approach, I'll add tests for the new behavior.

For context, this is very helpful for large clusters. With a --max-kill=10 we can now terminate up to 10 pods per run, and most of the time belonging to different deployments/stateful sets.

The configuration flag --max-kill specifies the maximum number of pods to be terminated per run,
with a default value of 1, to maintain existing behavior.

Adds a new filter: filterByOwnerReference to avoid terminating multiple pods belonging to the
same owner. This prevents pods deployed together to be terminated at the same time.

In practice, no more than 1 pod per owner will be terminated during each run. All pods without an owner
reference are eligible to be terminated in the same batch (up to --max-kill value)
chaoskube/chaoskube.go Outdated Show resolved Hide resolved
@linki

This comment has been minimized.

Copy link
Owner

linki commented Nov 5, 2019

@pims Thanks! I think the approach is good. I left a comment.

linki and others added 3 commits Nov 5, 2019
linki added 2 commits Nov 7, 2019
@linki

This comment has been minimized.

Copy link
Owner

linki commented Nov 7, 2019

We forgot the cmdline flag for it 😄 I added it.

@linki linki merged commit ca1f0dc into linki:master Nov 7, 2019
3 checks passed
3 checks passed
GolangCI No issues found!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.3%) to 92.157%
Details
@linki

This comment has been minimized.

Copy link
Owner

linki commented Nov 7, 2019

@pims Thank you, again!

@pims

This comment has been minimized.

Copy link
Contributor Author

pims commented Nov 7, 2019

Thanks for accepting this change!

@linki

This comment has been minimized.

Copy link
Owner

linki commented Nov 8, 2019

It was a pleasure. This feature is released in version v0.16.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.