Skip to content
New issue

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

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

Already on GitHub? # to your account

Ensure a random pod is picked within an owner reference group #203

Merged
merged 1 commit into from
May 2, 2020

Conversation

linki
Copy link
Owner

@linki linki commented May 1, 2020

Fix for #197

@linki linki changed the title [wip] Fix that chaoskube always kills the first pod of a group Instead of always the first pod, pick a random pod within an ownerref group May 2, 2020
@linki linki changed the title Instead of always the first pod, pick a random pod within an ownerref group Ensures a random pod is picked within an owner reference group May 2, 2020
@linki linki changed the title Ensures a random pod is picked within an owner reference group Ensure a random pod is picked within an owner reference group May 2, 2020
@linki
Copy link
Owner Author

linki commented May 2, 2020

This works quite well now.

With maxKill set to 1 (default):

  • Given a single Deployment with 3 replicas it will pick a random one.
  • Given two Deployments with each 3 replicas it will pick a random one from either one.
  • Given three Deployments with each 3 replicas it will pick a random one from either one.

With maxKill set to 2:

  • Given a single Deployment with 3 replicas it will pick a random.
  • Given two Deployments with each 3 replicas it will pick a random one from each one respectively.
  • Given three Deployments with each 3 replicas it will pick a random one from two of them.

With maxKill set to 3:

  • Given a single Deployment with 3 replicas it will pick a random.
  • Given two Deployments with each 3 replicas it will pick a random one from each one respectively.
  • Given two Deployments with each 3 replicas it will pick a random one from each one respectively.

Thanks to @pims for the initial implementation in #154.

@linki linki merged commit 67bb025 into master May 2, 2020
@linki linki deleted the owner-ref branch May 2, 2020 14:00
@pims
Copy link
Contributor

pims commented May 2, 2020

Good catch @linki 👍🏼

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants