Skip to content

Commit 7c1eb78

Browse files
authored
update CRD documents (#725)
1 parent 983c8ad commit 7c1eb78

File tree

1 file changed

+59
-28
lines changed

1 file changed

+59
-28
lines changed

docs/zh/04-best-practice/03-special-environment-deployment.md

Lines changed: 59 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -132,34 +132,43 @@ K8s 使用 macvlan CNI 时,在 rootns 下只能看到所有 POD 共用的一
132132

133133
## IPVlan
134134

135-
唯一需要注意的是,采集器的 tap_interface_regex 只需配置为 Node NIC 列表。
135+
唯一需要注意的是,Agent 的 tap_interface_regex 只需配置为 Node NIC 列表。
136136

137137
## Cilium eBPF
138138

139-
唯一需要注意的是,采集器的 tap_interface_regex 只需配置为 Node NIC 列表。
139+
唯一需要注意的是,Agent 的 tap_interface_regex 只需配置为 Node NIC 列表。
140140

141141
# 特殊 K8s 资源或 CRD
142142

143143
这类场景需要进行以下操作:
144144

145-
- Agent 高级配置中打开和关闭对应的资源
146-
- 配置 Kubernetes API 权限
145+
- Agent 配置中打开和关闭对应的资源
146+
- 在 Agent 部署集群中配置 Kubernetes API 权限
147147

148148
## OpenShift
149149

150150
该场景需要关闭默认的 `Ingress` 资源获取,打开 `Route` 资源获取。
151151

152-
Agent 高级配置如下:
152+
- [Route](https://docs.redhat.com/en/documentation/openshift_container_platform/4.14/html/network_apis/route-route-openshift-io-v1)
153+
154+
```yaml
155+
apiVersion: route.openshift.io/v1
156+
kind: Route
157+
```
158+
159+
修改 Agent 配置如下:
153160
154161
```yaml
155-
static_config:
156-
kubernetes-resources:
157-
- name: ingresses
158-
disabled: true
159-
- name: routes
162+
inputs:
163+
resources:
164+
kubernetes:
165+
api_resources:
166+
- name: ingresses
167+
disabled: true
168+
- name: routes
160169
```
161170
162-
ClusterRole 配置增加
171+
在 Agent 所在容器集群中修改 Agent 的 ClusterRole 配置,增加如下规则
163172
164173
```yaml
165174
rules:
@@ -175,24 +184,42 @@ rules:
175184
176185
## OpenKruise
177186
178-
该场景下需要从 API 获取 `CloneSet` 和 `apps.kruise.io/StatefulSet` 资源。
187+
该场景下需要从 API 获取 `CloneSet` 和 `Advanced StatefulSet` 资源。
188+
189+
- [CloneSet](https://openkruise.io/docs/user-manuals/cloneset/)
190+
191+
```yaml
192+
apiVersion: apps.kruise.io/v1alpha1
193+
kind: CloneSet
194+
```
179195

180-
Agent 高级配置如下:
196+
- [Advanced StatefulSet](https://openkruise.io/docs/user-manuals/advancedstatefulset/)
197+
198+
```yaml
199+
apiVersion: apps.kruise.io/v1beta1
200+
kind: StatefulSet
201+
```
202+
203+
修改 Agent 配置如下:
181204

182205
```yaml
183-
static_config:
184-
kubernetes-resources:
185-
- name: clonesets
186-
group: apps.kruise.io
187-
- name: statefulsets
188-
group: apps
189-
- name: statefulsets
190-
group: apps.kruise.io
206+
inputs:
207+
resources:
208+
kubernetes:
209+
api_resources:
210+
- name: clonesets
211+
group: apps.kruise.io
212+
- name: statefulsets
213+
group: apps
214+
- name: statefulsets
215+
group: apps.kruise.io
191216
```
192217

193-
注意这里需要加上 Kubernetes 的 `apps/StatefulSet`。
218+
::: tip
219+
由于 `statefulsets` 在 `apps` 和 `apps.kruise.io` 组中重名,如果需要同时获取 Kubernetes 的 `StatefulSet`,这里除配置 `group=apps.kruise.io, name=statefulsets` 资源同步外,需要同时开启 `group=apps, name=statefulsets` 的资源同步。
220+
:::
194221

195-
ClusterRole 配置增加
222+
在 Agent 所在容器集群中修改 Agent 的 ClusterRole 配置,增加如下规则
196223

197224
```yaml
198225
- apiGroups:
@@ -210,15 +237,19 @@ ClusterRole 配置增加:
210237

211238
该场景下需要从 API 获取 `OpenGaussCluster` 资源。
212239

213-
Agent 高级配置如下:
240+
- [OpenGaussCluster](https://github.com/opengauss-mirror/openGauss-operator)
241+
242+
修改 Agent 配置如下:
214243

215244
```yaml
216-
static_config:
217-
kubernetes-resources:
218-
- name: opengaussclusters
245+
inputs:
246+
resources:
247+
kubernetes:
248+
api_resources:
249+
- name: opengaussclusters
219250
```
220251

221-
ClusterRole 配置增加
252+
在 Agent 所在容器集群中修改 Agent 的 ClusterRole 配置,增加如下规则
222253

223254
```yaml
224255
- apiGroups:

0 commit comments

Comments
 (0)