Skip to content

Commit 333caa3

Browse files
committed
更新采集器高级配置文档
1 parent cd11740 commit 333caa3

1 file changed

Lines changed: 92 additions & 0 deletions

File tree

docs/zh/02-install/09-advanced-config/02-agent-advanced-config.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,98 @@ K8s 使用 macvlan CNI 时,在 rootns 下只能看到所有 POD 共用的一
145145
deepflow-ctl agent list
146146
```
147147

148+
### 需要从 Kubernetes API 获取额外资源或 CRD 的情况
149+
150+
这类场景需要进行以下操作:
151+
- 采集器高级配置中打开和关闭对应的资源
152+
- 配置 Kubernetes API 权限
153+
154+
#### OpenShift
155+
156+
该场景需要关闭默认的 `Ingress` 资源获取,打开 `Route` 资源获取。
157+
158+
采集器高级配置如下:
159+
160+
```yaml
161+
static-config:
162+
kubernetes-resources:
163+
- name: ingresses
164+
disabled: true
165+
- name: routes
166+
```
167+
168+
ClusterRole 配置增加:
169+
170+
```yaml
171+
rules:
172+
- apiGroups:
173+
- route.openshift.io
174+
resources:
175+
- routes
176+
verbs:
177+
- get
178+
- list
179+
- watch
180+
```
181+
182+
#### 平安 ServiceRule
183+
184+
该场景下需要从 API 获取 `ServiceRule` 资源。
185+
186+
采集器高级配置如下:
187+
188+
```yaml
189+
static-config:
190+
kubernetes-resources:
191+
- name: servicerules
192+
```
193+
194+
ClusterRole 配置增加:
195+
196+
```yaml
197+
rules:
198+
- apiGroups:
199+
- crd.pingan.org
200+
resources:
201+
- servicerules
202+
verbs:
203+
- get
204+
- list
205+
- watch
206+
```
207+
208+
#### OpenKruise
209+
210+
该场景下需要从 API 获取 `CloneSet``apps.kruise.io/StatefulSet` 资源。
211+
212+
采集器高级配置如下:
213+
214+
```yaml
215+
static-config:
216+
kubernetes-resources:
217+
- name: clonesets
218+
group: apps.kruise.io
219+
- name: statefulsets
220+
group: apps
221+
- name: statefulsets
222+
group: apps.kruise.io
223+
```
224+
225+
注意这里需要加上 Kubernetes 的 `apps/StatefulSet`
226+
227+
ClusterRole 配置增加:
228+
229+
```yaml
230+
- apiGroups:
231+
- apps.kruise.io
232+
resources:
233+
- clonesets
234+
- statefulsets
235+
verbs:
236+
- get
237+
- list
238+
- watch
239+
```
148240

149241
# 以进程形态部署 DeepFlow Agent
150242

0 commit comments

Comments
 (0)