Skip to content

Commit

Permalink
Merge pull request #33 from Al-assad/dev
Browse files Browse the repository at this point in the history
Doc: Restart Doris cluster
  • Loading branch information
Al-assad authored Dec 1, 2023
2 parents a4fc9e4 + ca2ea75 commit 75eec5a
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 0 deletions.
41 changes: 41 additions & 0 deletions docs/maintian/restart-doris-cluster/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "Restart Doris Cluster"
weight: 605
---

{{< callout context="caution" title="Caution" icon="alert-triangle" >}}
The following feature is available in Doris-Operator v1.0.4 and later.
{{< /callout >}}

When using the Doris cluster, if you need to restart the cluster, you can modify the cluster configuration by using
`kubectl edit dc ${name} -n ${namespace}`.
To indicate the desired rolling restart for Doris cluster components, add the
annotation `al-assad.github.io/restartedAt` to the Spec of the respective Doris cluster components, with the Value set
to the current time.
In the following example, annotations are set for the FE, BE, CN, and Broker components, indicating
a rolling restart for all Pods of these three Doris cluster components.
Depending on the actual situation, you can set annotations only for specific components.

```yaml
apiVersion: al-assad.github.io/v1beta1
kind: DorisCluster
metadata:
name: basic
spec:
fe:
...
annotations:
al-assad.github.io/restartedAt: "2023-12-01T12:00"
be:
...
annotations:
al-assad.github.io/restartedAt: "2023-12-01T12:00"
cn:
...
annotations:
al-assad.github.io/restartedAt: "2023-12-01T12:00"
broker:
...
annotations:
al-assad.github.io/restartedAt: "2023-12-01T12:00"
```
39 changes: 39 additions & 0 deletions docs/maintian/restart-doris-cluster/index.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: "重启 Doris 集群"
weight: 605
---

{{< callout context="caution" title="注意" icon="alert-triangle" >}}
以下功能在 Doris-Operator v1.0.4 及以上版本中可用。
{{< /callout >}}

在使用 Doris 集群的过程中,如果需要对集群进行重启,可以通过 `kubectl edit dc ${name} -n ${namespace}` 修改集群配置,为期望优雅滚动重启的
Doris 集群组件 Spec 添加 annotation `al-assad.github.io/restartedAt`,Value 设置为当前时间。

以下示例中为组件 FE、BE、CN、Broker 都设置了 annotation,表示将优雅滚动重启以上三个 Doris 集群组件的所有
Pod。可以根据实际情况,只为某个组件设置 annotation。

```yaml
apiVersion: al-assad.github.io/v1beta1
kind: DorisCluster
metadata:
name: basic
spec:
fe:
...
annotations:
al-assad.github.io/restartedAt: "2023-12-01T12:00"
be:
...
annotations:
al-assad.github.io/restartedAt: "2023-12-01T12:00"
cn:
...
annotations:
al-assad.github.io/restartedAt: "2023-12-01T12:00"
broker:
...
annotations:
al-assad.github.io/restartedAt: "2023-12-01T12:00"
```
11 changes: 11 additions & 0 deletions examples/advanced/doris-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ spec:
# FE Advanced Configuration #
############################

## Annotations for FE pods
# annotations: {}

## Host aliases for FE pods, it will be merged with the hadoopConf field
## Ref: https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
# hostAliases:
Expand Down Expand Up @@ -251,6 +254,8 @@ spec:
## Whether to retain the default data storage mount for BE which is located at be/storage,
# retainDefaultStorage: false

## Annotations for BE pods
# annotations: {}

## Host aliases for BE pods, it will be merged with the hadoopConf field
## Ref: https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
Expand Down Expand Up @@ -339,6 +344,9 @@ spec:
# CN Advanced Configuration #
############################

## Annotations for CN pods
# annotations: {}

## Host aliases for BE pods, it will be merged with the hadoopConf field
## Ref: https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
# hostAliases:
Expand Down Expand Up @@ -422,6 +430,9 @@ spec:
# Broker Advanced Configuration #
################################

## Annotations for Broker pods
# annotations: {}

## Host aliases for BE pods, it will be merged with the hadoopConf field
## Ref: https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
# hostAliases:
Expand Down

0 comments on commit 75eec5a

Please sign in to comment.