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

Allow global namespace kill settings #135

Open
gjcarneiro opened this issue Dec 19, 2018 · 7 comments
Open

Allow global namespace kill settings #135

gjcarneiro opened this issue Dec 19, 2018 · 7 comments

Comments

@gjcarneiro
Copy link

gjcarneiro commented Dec 19, 2018

My app has many many deployments, it would be tedious to have to modify all of them.

Can we instead have some annotations on a namespace. I'd like my dev namespace to just randomly kill pods.

apiVersion: v1
kind: Namespace
metadata:
  name: my-dev-namespace
  # add kube-monkey labels as usual, they will apply to everything inside the namespace
  labels:
    kube-monkey/enabled: enabled
    kube-monkey/identifier: monkey-victim
    kube-monkey/mtbf: '2'
    kube-monkey/kill-mode: "fixed"
    kube-monkey/kill-value: 1
@prageethw
Copy link
Contributor

@gjcarneiro I think that's the benefit of this chaos solution giving total control to the victim whether he should be treated as a victim or not.
there are other chaos solutions that provide similar behaviour https://github.com/linki/chaoskube

@gjcarneiro
Copy link
Author

Ah, I didn't know about chaoskube. That one sounds like it's closer to what I'd like. Thanks for the tip!

kube-monkey seems to me to be too conservative. kube-monkey seems more suited to a production environment, when you think your production can survive pods being killed.

But I need a more aggressive pod killer, to really stress out the dev cluster.

@asobti
Copy link
Owner

asobti commented Dec 20, 2018

I think your use case is valid. There are work-arounds for you (eg. adding the labels to all deployments under the namespace) but obviously that is not convenient. I'm going to re-open this issue to see if we can support setting labels at the namespace level.

kube-monkey seems to me to be too conservative.

When it comes to enrolling apps into kube-monkey, I agree with you that kube-monkey is too conservative, and this is not by design. I do want to have an 'opt out' mode in kube-monkey where ALL apps are automatically opted in, with specific apps being able to opt themselves out. This is a better set up for a dev environment where you want to require developers to build with kube-monkey in mind.

@asobti asobti reopened this Dec 20, 2018
@gjcarneiro
Copy link
Author

An additional problem I found was that "kube-monkey/mtbf" can only be integer and it's days, but I don't want to have to wait days for a pod to get killed.

@Aergonus
Copy link
Collaborator

I have a comment somewhere about changing that to support times using something like or https://github.com/raintank/dur

@dchourasia
Copy link

@asobti do we have Opt-Out mode enabled now with kube-monkey?.. do not see it in the docs so just want to confirm.

@SitalPrusty2708
Copy link

@asobti Same question as above, do we have the opt out mode now ? For random pods to be deleted instead of specifc ones please ?

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

No branches or pull requests

6 participants