Skip to content

Commit

Permalink
Support restart of service pods (#2378)
Browse files Browse the repository at this point in the history
* Support restart of service pods (#103)

* support restart of service pods

* add example to show how to use secret

* Update 3.1.customize-installation.md

* Update mkdocs.yml

* minor changes

* Update docs-2.0-zh/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-zh/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-en/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-en/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-en/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-en/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-en/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-en/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-en/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-en/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-en/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* Update docs-2.0-en/k8s-operator/4.cluster-administration/4.9.advanced/4.9.2.restart-cluster.md

Co-authored-by: Chris Chen <[email protected]>

* comment fix

* Update mkdocs.yml

* comment fix

---------

Co-authored-by: Chris Chen <[email protected]>

* support-restart-of-service-pods

Co-Authored-By: Chris Chen <[email protected]>

---------

Co-authored-by: Chris Chen <[email protected]>
  • Loading branch information
abby-cyber and ChrisChen2023 authored Nov 28, 2023
1 parent b55880b commit b23fa90
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Part of the above parameters are described as follows:
| :------------------------------------- | :------------------------------ | :----------------------------------------- |
| `image.nebulaOperator.image` | `vesoft/nebula-operator:{{operator.tag}}` | The image of NebulaGraph Operator, version of which is {{operator.release}}. |
| `image.nebulaOperator.imagePullPolicy` | `IfNotPresent` | The image pull policy in Kubernetes. |
| `imagePullSecrets` | - | The image pull secret in Kubernetes. |
| `imagePullSecrets` | - | The image pull secret in Kubernetes. For example `imagePullSecrets[0].name="vesoft"`.|
| `kubernetesClusterDomain` | `cluster.local` | The cluster domain. |
| `controllerManager.create` | `true` | Whether to enable the controller-manager component. |
| `controllerManager.replicas` | `2` | The number of controller-manager replicas. |
Expand All @@ -78,4 +78,18 @@ The following example shows how to enable AdmissionWebhook when you install Nebu
helm install nebula-operator nebula-operator/nebula-operator --namespace=<nebula-operator-system> --set admissionWebhook.create=true
```

For more information about `helm install`, see [Helm Install](https://helm.sh/docs/helm/helm_install/).
Check whether the specified configuration of NebulaGraph Operator is installed successfully:

```bash
helm get values nebula-operator -n <nebula-operator-system>
```

Example output:

```yaml
USER-SUPPLIED VALUES:
admissionWebhook:
create: true
```
For more information about `helm install`, see [Helm Install](https://helm.sh/docs/helm/helm_install/).
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,18 @@ This topic introduces how to update the configuration of NebulaGraph Operator.
helm upgrade nebula-operator nebula-operator/nebula-operator --namespace=nebula-operator-system --version={{operator.release}} --set admissionWebhook.create=true
```

For more information, see [Helm upgrade](https://helm.sh/docs/helm/helm_update/).
For more information, see [Helm upgrade](https://helm.sh/docs/helm/helm_upgrade/).

4. Check whether the configuration of NebulaGraph Operator is updated successfully.

```bash
helm get values nebula-operator -n nebula-operator-system
```

Example output:

```yaml
USER-SUPPLIED VALUES:
admissionWebhook:
create: true
```
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

Output:

```bash
```yaml
Release "nebula-operator" has been upgraded. Happy Helming!
NAME: nebula-operator
LAST DEPLOYED: Tue Apr 16 02:21:08 2022
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ Using NebulaGraph Operator to install NebulaGraph clusters enables automated clu
--version={{operator.release}} \
# Specify the namespace for the NebulaGraph cluster.
--namespace="${NEBULA_CLUSTER_NAMESPACE}" \
# Customize the chart release name.
# Configure the Secret for pulling images from the private repository.
--set imagePullSecrets[0].name="{<image-pull-secret>}" \
# Customize the cluster name.
--set nameOverride="${NEBULA_CLUSTER_NAME}" \
--set nebula.storageClassName="${STORAGE_CLASS_NAME}" \
# Specify the version for the NebulaGraph cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Operator triggers a rolling update of the NebulaGraph cluster under the followin

- The version of the NebulaGraph cluster changes.
- The configuration of the NebulaGraph cluster changes.
- NebulaGraph cluster services are restarted.

## Specify a rolling update strategy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ scheduler:
| :------------------------------------- | :------------------------------ | :----------------------------------------- |
| `image.nebulaOperator.image` | `vesoft/nebula-operator:{{operator.tag}}` | NebulaGraph Operator 的镜像,版本为{{operator.release}}。 |
| `image.nebulaOperator.imagePullPolicy` | `IfNotPresent` | 镜像拉取策略。 |
| `imagePullSecrets` | `[]` | 镜像拉取密钥 |
| `imagePullSecrets` | `[]` | 镜像拉取密钥,例如`imagePullSecrets[0].name="vesoft"`|
| `kubernetesClusterDomain` | `cluster.local` | 集群域名。 |
| `controllerManager.create` | `true` | 是否启用 controller-manager。 |
| `controllerManager.replicas` | `2` | controller-manager 副本数。 |
Expand All @@ -77,4 +77,20 @@ scheduler:

```bash
helm install nebula-operator nebula-operator/nebula-operator --namespace=<nebula-operator-system> --set admissionWebhook.create=true
```
```

验证是否开启 AdmissionWebhook:

```bash
helm get values nebula-operator -n <nebula-operator-system>
```

示例输出:

```yaml
USER-SUPPLIED VALUES:
admissionWebhook:
create: true
```
关于`helm install`命令更多信息, 参见 [Helm Install](https://helm.sh/docs/helm/helm_install/)。
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,20 @@
helm upgrade nebula-operator nebula-operator/nebula-operator --namespace=nebula-operator-system --version={{operator.release}} --set admissionWebhook.create=true
```

更多信息,参考 [Helm 升级](https://helm.sh/docs/helm/helm_update/)
更多信息,参考 [Helm 升级](https://helm.sh/docs/helm/helm_upgrade/)

4. 查看 NebulaGraph Operator 的配置是否更新成功。

```bash
helm get values nebula-operator -n nebula-operator-system
```

示例输出:

```yaml
USER-SUPPLIED VALUES:
admissionWebhook:
create: true
```
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

输出:

```bash
```yaml
Release "nebula-operator" has been upgraded. Happy Helming!
NAME: nebula-operator
LAST DEPLOYED: Tue Nov 16 02:21:08 2021
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,14 @@
--version={{operator.release}} \
# 指定 {{nebula.name}} 集群所处的命名空间。
--namespace="${NEBULA_CLUSTER_NAMESPACE}" \
# 自定义 chart 发布名称。
# 配置拉取私有仓库中镜像的 Secret。
--set imagePullSecrets[0].name="{<image-pull-secret>}" \
# 自定义集群名称。
--set nameOverride="${NEBULA_CLUSTER_NAME}" \
--set nebula.storageClassName="${STORAGE_CLASS_NAME}" \
# 指定 {{nebula.name}} 集群的版本。
--set nebula.version=v{{nebula.release}}
```

```

7. 查看 {{nebula.name}} 集群 Pod 的启动状态。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Operator 会在以下情况下触发 {{nebula.name}} 集群的滚动更新:

- {{nebula.name}} 集群的版本发生变化。
- {{nebula.name}} 集群的配置发生变化。
- {{nebula.name}} 集群的服务执行重启操作。

## 配置滚动更新策略

Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ nav:
# - Use local PV: k8s-operator/4.cluster-administration/4.4.storage-management/4.4.1.use-local-pv.md
- Dynamically expand persistent volumes: k8s-operator/4.cluster-administration/4.4.storage-management/4.4.2.pv-expansion.md
- Configure PV reclaim: k8s-operator/4.cluster-administration/4.4.storage-management/4.4.3.configure-pv-reclaim.md
- Logging: k8s-operator/4.cluster-administration/4.5.logging.md
- Log management: k8s-operator/4.cluster-administration/4.5.logging.md
- Security:
- Enable admission control: k8s-operator/4.cluster-administration/4.7.security/4.7.2.enable-admission-control.md
- HA and balancing:
Expand Down

0 comments on commit b23fa90

Please sign in to comment.