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

docs: Illustrate how to build operators locally #240

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ endif
build: build_yaml build_fuse

build_all: pre_build build docker-build
build_all_arm64: pre_build build docker-build-arm64

docker-build:
GOOS="linux" GOARCH="amd64" go build $(GO_FLAGS) -o build/_output/bin/chaosblade-operator cmd/manager/main.go
Expand Down
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,37 @@ The current experimental scenarios involve resources including Node, Pod, and Co
* Memory: specify memory usage
* Container: remove container

##

## Local Build & Installation

## Build images

```shell
# Under operator's root directory

# For linux/amd64
make build_all

# For linux/arm64
make build_all_amr64
```

### Build and install Helm Chart

```shell
# Under operator's root directory
cd deploy/helm

# For linux/amd64
helm package ./chaosblade-operator
kubectl create ns chaosblade
helm install chaosblade chaosblade-operator-${version}.tgz --namespace chaosblade

# For linux/arm64
helm package ./chaosblade-operator-arm64
kubectl create ns chaosblade
helm install chaosblade chaosblade-operator-arm64-${version}.tgz --namespace chaosblade
```

## Install and uninstall
The lowest version of kubernetes supported is 1.12. Chaosblade operator can be installed through kubectl or helm, the installation method is as follows:
Expand Down
27 changes: 27 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,33 @@ Chaosblade Operator 是混沌工程实验工具 ChaosBlade 下的一款面向云
* 内存:指定内存使用率
* Container: 杀 Container

## 本地构建&安装

### 构造镜像

```shell
# operator 根目录下
# linux/amd64
make build_all
# linux/arm64
make build_all_amr64
```

### 构造并安装 Helm Chart

```shell
# operator 根目录下
cd deploy/helm
# linux/amd64
helm package ./chaosblade-operator
kubectl create ns chaosblade
helm install chaosblade chaosblade-operator-${version}.tgz --namespace chaosblade
# linux/arm64
helm package ./chaosblade-operator-arm64
kubectl create ns chaosblade
helm install chaosblade chaosblade-operator-arm64-${version}.tgz --namespace chaosblade
```

## 安装&卸载
支持的 Kubernetes 最小版本是 v1.12,chaosblade operator 可通过 kubectl 或者 helm 进行安装,安装方式如下:
注意:以下的 `VERSION` 请使用最新的版本号替代
Expand Down