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

Make chaos-daemon can run on non-k8s node and work independently #888

Closed
cwen0 opened this issue Sep 9, 2020 · 5 comments
Closed

Make chaos-daemon can run on non-k8s node and work independently #888

cwen0 opened this issue Sep 9, 2020 · 5 comments

Comments

@cwen0
Copy link
Member

cwen0 commented Sep 9, 2020

Feature Request

Is your feature request related to a problem? Please describe:

This is the first step to let Chaos Mesh adapt the non-k8s platform, the details refer to #879.

Describe the feature you'd like:

  • We can run chaos-daemon as a DaemonSet on the Kubernetes environment, in addition, we also can run chaos-daemon on VM node(or physical node) and work independently.
  • Create a client tool to work with chaos-daemon running on VM node(or physical node). Users can use this client tool to inject faults into applications or hardware devices on this node directly, such as:
./chaos attack kill process-name 
./chaos attack burn-cpu --load=100 --num=2 
./chaos attack shutdown --reboot # we also can use this to inject faults to Kubernetes itself, such as shutdown the Kubernetes master node directly or kill `kube-apiserver`
....
@cwen0 cwen0 added component/daemon type/enhancement Request for an improvement. labels Sep 9, 2020
@cwen0 cwen0 changed the title Make chaos-daemon can run on non-k8s Node and work independently Make chaos-daemon can run on non-k8s node and work independently Sep 9, 2020
@zhouqiang-cl
Copy link
Contributor

In this issue, we can also consider chaos plugins like CNI for kubelet

@YangKeao
Copy link
Member

In this issue, we can also consider chaos plugins like CNI for kubelet

This is not only an issue in chaos-daemon. It's also a big problem for controller-manager to define the struct (according to the resource) and watch them on k8s, communicating with the plugin (if you want to use the plugin in k8s scenario, which I think is always on our first priority.).

@zhouqiang-cl
Copy link
Contributor

zhouqiang-cl commented Sep 10, 2020

In this issue, we can also consider chaos plugins like CNI for kubelet

This is not only an issue in chaos-daemon. It's also a big problem for controller-manager to define the struct (according to the resource) and watch them on k8s, communicating with the plugin (if you want to use the plugin in k8s scenario, which I think is always on our first priority.).

So. it is "can also"😃

@Yiyiyimu
Copy link
Member

Yiyiyimu commented Oct 4, 2020

Hi @cwen0 , I'm applying community bridge and I'm willing to work on this feature. It would be so useful to inject chaos on applications that not mainly work on k8s, like what I'm doing to APISIX, so this is the feature I would also use.

I think I just figured out how to implement this feature. We don't need to change how to implement chaos, we just need to change its target from pod to non-k8s process, so only the interfaces for chaos-daemon need to change.

A rough timeline could be:

  1. Extract chaos-daemon to an independent repo, test grpc connection with k8s (not sure how to add cron with chaos-daemon only injection, for k8s)
  2. Adjust code to compatible with grpc-connect non-k8s process. Actually chaos-daemon is not highly coupled with k8s. Replacing runtime client seems all we need to do, so this step might not that hard.
  3. Design a new cron controller, to implement cyclic chaos injection for non-k8s process
  4. Add ctl/web-ui for better usage

Please point me out if I made mistake someplace 😊

@github-actions
Copy link

github-actions bot commented Dec 4, 2020

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants