Skip to content

Commit 0439a57

Browse files
WenyXunicecui
andauthored
refactor: refactor frontend groups documentation for Helm chart configuration (#2125)
Co-authored-by: Yiran <[email protected]>
1 parent 2364be3 commit 0439a57

File tree

2 files changed

+59
-68
lines changed

2 files changed

+59
-68
lines changed

docs/user-guide/deployments-administration/deploy-on-kubernetes/configure-frontend-groups.md

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,57 +31,52 @@ The configuration structure has changed between chart versions:
3131
Always refer to the latest [values.yaml](https://github.com/GreptimeTeam/helm-charts/blob/main/charts/greptimedb-cluster/values.yaml) in the Helm chart repository for the most up-to-date configuration structure.
3232
:::
3333

34-
When defining the frontend groups, you must specify the name field for each frontend instance. Below is an example configuration that creates read and write frontend replicas:
34+
When configuring frontend groups, ensure that each group includes a `name` field. The following `values.yaml` example demonstrates how to define separate frontend groups for read and write operations:
3535

3636
```yaml
37-
apiVersion: greptime.io/v1alpha1
38-
kind: GreptimeDBCluster
39-
metadata:
40-
name: greptimedb
41-
namespace: default
42-
spec:
43-
initializer:
44-
image: greptime/greptimedb-initializer:latest
45-
base:
46-
main:
47-
image: greptime/greptimedb:latest
48-
frontendGroups:
37+
frontend:
38+
enabled: false # Disable default frontend group
39+
40+
frontendGroups:
4941
- name: read
50-
replicas: 2
51-
config: |
52-
default_timezone = "UTC"
53-
[http]
54-
timeout = "60s"
55-
- name: write
5642
replicas: 1
5743
config: |
5844
default_timezone = "UTC"
5945
[http]
6046
timeout = "60s"
61-
meta:
62-
replicas: 1
63-
backendStorage:
64-
etcd:
65-
endpoints:
66-
- "etcd.etcd-cluster.svc.cluster.local:2379"
67-
datanode:
47+
template:
48+
main:
49+
resources:
50+
limits:
51+
cpu: 2000m
52+
memory: 2048Mi
53+
- name: write
6854
replicas: 1
55+
56+
meta:
57+
replicas: 1
58+
backendStorage:
59+
etcd:
60+
endpoints:
61+
- "etcd.etcd-cluster.svc.cluster.local:2379"
62+
63+
datanode:
64+
replicas: 1
65+
```
66+
67+
You can use the following command to apply the configuration:
68+
```
69+
helm upgrade --install ${release-name} greptime/greptimedb-cluster --namespace ${namespace} -f values.yaml
6970
```
7071

7172
## Validity
7273

7374
When setting the frontend groups, the name must be set.
7475

7576
```yaml
76-
# This is an illegal configuration !!!
77-
apiVersion: greptime.io/v1alpha1
78-
kind: GreptimeDBCluster
79-
metadata:
80-
name: greptimedb
81-
spec:
82-
frontendGroups:
77+
frontendGroups:
8378
# - name: read #<=========The name must be set=============>
84-
- replicas: 1
79+
- replicas: 1
8580
```
8681
8782
## Verify the Installation

i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/deploy-on-kubernetes/configure-frontend-groups.md

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,41 +31,42 @@ chart 版本之间的配置结构已发生变化:
3131
请参考 chart 仓库中配置 [values.yaml](https://github.com/GreptimeTeam/helm-charts/blob/main/charts/greptimedb-cluster/values.yaml) 以获取最新的结构。
3232
:::
3333

34-
定义 frontend 组时,必须为每个 frontend 实例指定名称字段。以下是创建读写 frontend 实例的示例配置
34+
在配置 frontend 组时,确保每个组都包含 `name` 字段。以下 `values.yaml` 示例展示了如何为读写操作分别定义不同的 frontend
3535

3636
```yaml
37-
apiVersion: greptime.io/v1alpha1
38-
kind: GreptimeDBCluster
39-
metadata:
40-
name: greptimedb
41-
namespace: default
42-
spec:
43-
initializer:
44-
image: greptime/greptimedb-initializer:latest
45-
base:
46-
main:
47-
image: greptime/greptimedb:latest
48-
frontendGroups:
37+
frontend:
38+
enabled: false # 禁用默认 frontend 组
39+
40+
frontendGroups:
4941
- name: read
50-
replicas: 2
51-
config: |
52-
default_timezone = "UTC"
53-
[http]
54-
timeout = "60s"
55-
- name: write
5642
replicas: 1
5743
config: |
5844
default_timezone = "UTC"
5945
[http]
6046
timeout = "60s"
61-
meta:
62-
replicas: 1
63-
backendStorage:
64-
etcd:
65-
endpoints:
66-
- "etcd.etcd-cluster.svc.cluster.local:2379"
67-
datanode:
47+
template:
48+
main:
49+
resources:
50+
limits:
51+
cpu: 2000m
52+
memory: 2048Mi
53+
- name: write
6854
replicas: 1
55+
56+
meta:
57+
replicas: 1
58+
backendStorage:
59+
etcd:
60+
endpoints:
61+
- "etcd.etcd-cluster.svc.cluster.local:2379"
62+
63+
datanode:
64+
replicas: 1
65+
```
66+
67+
你可以使用以下命令应用上述配置:
68+
```
69+
helm upgrade --install ${release-name} greptime/greptimedb-cluster --namespace ${namespace} -f values.yaml
6970
```
7071

7172
## 合规配置
@@ -74,14 +75,9 @@ spec:
7475

7576
```yaml
7677
# 非法配置 !!!
77-
apiVersion: greptime.io/v1alpha1
78-
kind: GreptimeDBCluster
79-
metadata:
80-
name: greptimedb
81-
spec:
82-
frontendGroups:
83-
# - name: read #<=========The name must be set=============>
84-
- replicas: 1
78+
frontendGroups:
79+
# - name: read #<=========必须指定该字段=============>
80+
- replicas: 1
8581
```
8682
8783
## 校验安装

0 commit comments

Comments
 (0)