diff --git a/docs/maintian/restart-doris-cluster/index.md b/docs/maintian/restart-doris-cluster/index.md new file mode 100644 index 0000000..d9c05c3 --- /dev/null +++ b/docs/maintian/restart-doris-cluster/index.md @@ -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" +``` diff --git a/docs/maintian/restart-doris-cluster/index.zh.md b/docs/maintian/restart-doris-cluster/index.zh.md new file mode 100644 index 0000000..3759754 --- /dev/null +++ b/docs/maintian/restart-doris-cluster/index.zh.md @@ -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" +``` + diff --git a/examples/advanced/doris-cluster.yaml b/examples/advanced/doris-cluster.yaml index 7f0de0a..06ec9be 100644 --- a/examples/advanced/doris-cluster.yaml +++ b/examples/advanced/doris-cluster.yaml @@ -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: @@ -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/ @@ -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: @@ -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: