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

feature: support download mode for deploying chaosblade tool to targe… #97

Merged
merged 1 commit into from
Aug 4, 2021

Conversation

xcaspar
Copy link
Member

@xcaspar xcaspar commented Aug 4, 2021

…t container

Signed-off-by: xcaspar changjun.xcj@alibaba-inc.com

Describe what this PR does / why we need it

Does this pull request fix one issue?

chaosblade-io/chaosblade#553

Describe how you did it

  1. Add chaosblade-deploy-mode flag to specify deployment mode, default value is copy, which is copied from the operator container to the target container. Another value is download, which is downloaded chaosblade tool from the remote address.
  2. Add chaosblade-download-url flag to config the chaosblade downloaded url. You can also specify the blade.downloadUrl config when installing chaosblade-operator, such as --set blade.downloadUrl=https://chaosblade.oss-xxxx.aliyuncs.com/agent/github/1.3.0. Under this address, the following files must be included:
.
├── bin
├── blade
├── lib.tar.gz
└── yaml.tar.gz
  • bin: The directory where the os experiments file is located.
  • blade: Chaoblade CLI.
  • lib.tar.gz: lib package file.
  • yaml.tar.gz: yaml package file.

Describe how to verify it

blade c k8s pod-cpu fullload --chaosblade-deploy-mode download --chaosblade-download-url https://chaosblade.oss-xxx.aliyuncs.com/agent/github/1.3.0 --names logtail-ds-gzd72 --namespace kube-system -d --kubeconfig ~/.kube/config                     
{"code":200,"success":true,"result":"dcdf0a13814fcacc"}

Or using blade.downloadUrl to specify the download url when installing the operator.

helm install chaosblade-operator deploy/helm/chaosblade-operator-for-v3 --namespace chaosblade --set blade.downloadUrl=https://chaosblade.oss-xxxxx.aliyuncs.com/agent/github/1.3.0 

Then you can create experiment without chaosblade-download-url, such as:

blade c k8s pod-cpu fullload --chaosblade-deploy-mode download --names logtail-ds-gzd72 --namespace kube-system -d --kubeconfig ~/.kube/config  
{"code":200,"success":true,"result":"3be6ebb2625f792e"}

You can also add --chaosblade-override flag to update chaosblade tool in the target container.

Special notes for reviews

…t container

Signed-off-by: xcaspar <changjun.xcj@alibaba-inc.com>
@xcaspar xcaspar added this to the v1.3.0 milestone Aug 4, 2021
@xcaspar xcaspar requested a review from MandssS August 4, 2021 07:26
@MandssS MandssS merged commit c213e51 into 1.3.0-dev Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants