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

add crd updating step for 090 #1221

Merged
merged 11 commits into from
Nov 16, 2021
2 changes: 1 addition & 1 deletion docs-2.0/20.appendix/6.eco-tool-version.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Nebula Operator(简称Operator)是用于在Kubernetes系统上自动化部

|Nebula Graph版本|Operator版本(commit id)|
|:---|:---|
| {{ nebula.release }} | {{operator.release}}(6d1104e) |
| {{ nebula.release }} | {{operator.release}}(ba88e28) |

## Nebula Importer

Expand Down
52 changes: 50 additions & 2 deletions docs-2.0/nebula-operator/2.deploy-nebula-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
[abby@master ~]$ helm show values nebula-operator/nebula-operator
image:
nebulaOperator:
image: vesoft/nebula-operator:latest
image: vesoft/nebula-operator:{{operator.branch}}
imagePullPolicy: Always
kubeRBACProxy:
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
Expand Down Expand Up @@ -145,7 +145,7 @@ scheduler:
| `image.nebulaOperator.image` | `vesoft/nebula-operator:latest` | Nebula Operator的镜像,版本为{{operator.release}}。 |
| `image.nebulaOperator.imagePullPolicy` | `IfNotPresent` | 镜像拉取策略。 |
| `imagePullSecrets` | - | 镜像拉取密钥。 |
| `kubernetesClusterDomain` | `cluster.local` | 集群域名。 |
| `kubernetesClusterDomain` | `cluster.local` | 集群域名。 |
| `controllerManager.create` | `true` | 是否启用controller-manager。 |
| `controllerManager.replicas` | `2` | controller-manager副本数。 |
| `admissionWebhook.create` | `true` | 是否启用Admission Webhook。 |
Expand Down Expand Up @@ -192,6 +192,7 @@ helm install nebula-operator nebula-operator/nebula-operator --namespace=<nebula

1. 拉取最新的Helm仓库。


```bash
helm repo update
```
Expand All @@ -202,6 +203,53 @@ helm install nebula-operator nebula-operator/nebula-operator --namespace=<nebula
helm upgrade nebula-operator nebula-operator/nebula-operator --namespace=<namespace_name> --version={{operator.release}}
```

示例:

```bash
helm upgrade nebula-operator nebula-operator/nebula-operator --namespace=nebula-operator-system --version={{operator.release}}
```

输出:

```bash
Release "nebula-operator" has been upgraded. Happy Helming!
NAME: nebula-operator
LAST DEPLOYED: Tue Nov 16 02:21:08 2021
NAMESPACE: nebula-operator-system
STATUS: deployed
REVISION: 3
TEST SUITE: None
NOTES:
Nebula Operator installed!
```

3. 拉取最新的CRD配置文件。

!!! note
升级Operator后,需要同时升级相应的CRD配置,否则Nebula Graph集群创建会失败。有关CRD的配置,参见[apps.nebula-graph.io_nebulaclusters.yaml](https://github.com/vesoft-inc/nebula-operator/blob/{{operator.branch}}/config/crd/bases/apps.nebula-graph.io_nebulaclusters.yaml)。

```bash
helm pull nebula-operator/nebula-operator
```

4. 升级CRD配置文件。

```bash
kubectl apply -f <crd_file_name>.yaml
```

示例:

```bash
kubectl apply -f config/crd/bases/apps.nebula-graph.io_nebulaclusters.yaml
```

输出:

```bash
customresourcedefinition.apiextensions.k8s.io/nebulaclusters.apps.nebula-graph.io created
```


### 卸载Nebula Operator

Expand Down
5 changes: 3 additions & 2 deletions docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

- 不支持升级通过0.8.0版Operator创建的集群。

## 使用Kubectl升级Nebula Graph集群。

## 使用Kubectl升级Nebula Graph集群

### 前提条件

Expand Down Expand Up @@ -166,7 +167,7 @@

`--set nebula.version`的值指需要升级集群的目标版本号。

4. 等待一会后,执行以下命令查看集群状态及集群版本。
4. 执行以下命令查看集群状态及集群版本。

查看集群状态:

Expand Down