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

config whitelist_namespaces required #78

Closed
pawarmanoj opened this issue Jul 3, 2018 · 10 comments
Closed

config whitelist_namespaces required #78

pawarmanoj opened this issue Jul 3, 2018 · 10 comments

Comments

@pawarmanoj
Copy link

I have configured kube-monkey in the kube-system namespace. The kube-monkey pod, deployment, replica-set and config are all seen in good health on the kubernetes dashboard.

$ sudo nano /etc/kube-monkey/config.toml
[kubemonkey]
dry_run = false
run_hour = 9
start_hour = 10
end_hour = 18
graceperiod_sec = 120
blacklisted_namespaces = ["kube-system","kube-chaos"]
time_zone = "Asia/Kolkata"
[debug]
enabled = true
schedule_delay=300
force_should_kill = true
schedule_immediate_kill = true

My deployment has the necessary labels to mark the pod for termination.
kube-chaos-tomcat-deployment.txt

Yet kube-monkey is unable to find any pods for termination.
Logs show :

I0703 18:16:03.623685 1 kubemonkey.go:19] Debug mode detected!
I0703 18:16:03.623705 1 kubemonkey.go:20] Status Update: Generating next schedule in 30 sec
I0703 18:16:33.623885 1 schedule.go:64] Status Update: Generating schedule for terminations
I0703 18:16:33.722343 1 schedule.go:57] Status Update: 0 terminations scheduled today
I0703 18:16:33.722398 1 kubemonkey.go:63] Status Update: Waiting to run scheduled terminations.
I0703 18:16:33.722410 1 kubemonkey.go:77] Status Update: All terminations done.

Could someone please assist me in debugging what my mistake could be?
Thanks.

@asobti
Copy link
Owner

asobti commented Jul 3, 2018

@Spellchaser Could this be caused because no whitelisted_namespaces are specified?

@pawarmanoj
Copy link
Author

Thanks a lot @asobti
I didn't realize that both the blacklisted_namespaces and whitelisted_namespaces would need to be specified for proper operation.
And is there a way to quickly refresh kube-monkey to pick up the updated config map? Currently I am deleting the existing kube-monkey pod, so the restarted pod picks up the updated config.

@Aergonus
Copy link
Collaborator

Aergonus commented Jul 4, 2018 via email

@asobti
Copy link
Owner

asobti commented Jul 5, 2018

@pawarmanoj Can you try adding whitelisted_namespaces = [] in your config file.

@asobti
Copy link
Owner

asobti commented Jul 5, 2018

Regarding hot-reload of configs, as @Spellchaser mentions, its a known bug that requires an upstream fix in vip. See #17

@pawarmanoj
Copy link
Author

Yes, after adding whitelisted_namespaces = [] in the config file, kube-monkey is successfully able to terminate the pods that have opted-in for termination. thanks again @Spellchaser and @asobti

@asobti
Copy link
Owner

asobti commented Jul 6, 2018

@Spellchaser leaving this open for now until you can confirm whether needing to specify whitelisted_namespaces = [] to disable the whitelist is a bug or intended behavior

@Aergonus
Copy link
Collaborator

Aergonus commented Jul 7, 2018 via email

@Aergonus Aergonus changed the title kube-monkey is unable to find pods for termination. config whitelist_namespaces required Jul 9, 2018
@Aergonus
Copy link
Collaborator

Aergonus commented Jul 9, 2018

Found the issue: "namespace": "chaos-sandbox",
The default is to only whitelist the default namespace. It's listed in the docs, but it's confusing in the example.

@Aergonus
Copy link
Collaborator

Going to close this in favor of #5, opt-in whitelist

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

3 participants