Skip to content

Commit 65d7ece

Browse files
committed
[docs] move crd and lua to features
1 parent 25768a3 commit 65d7ece

File tree

3 files changed

+269
-262
lines changed

3 files changed

+269
-262
lines changed

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

Lines changed: 0 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -138,133 +138,6 @@ K8s 使用 macvlan CNI 时,在 rootns 下只能看到所有 POD 共用的一
138138

139139
唯一需要注意的是,Agent 的 tap_interface_regex 只需配置为 Node NIC 列表。
140140

141-
# 特殊 K8s 资源或 CRD
142-
143-
当发现未同步的(找不到工作负载的)容器 Pod 时,
144-
- 如果 Pod 的`metadata.ownerReferences[].apiVersion = apps.kruise.io/v1beta1`,那么对应的 K8s 平台应该是 OpenKruise
145-
- 如果 Pod 的`metadata.ownerReferences[].apiVersion = opengauss.sig/v1`,那么对应的 K8s 平台应该是 OpenGauss
146-
147-
这类场景需要进行以下操作:
148-
149-
- Agent 配置中打开和关闭对应的资源
150-
- 在 Agent 部署集群中配置 Kubernetes API 权限
151-
152-
## OpenShift
153-
154-
该场景需要关闭默认的 `Ingress` 资源获取,打开 `Route` 资源获取。
155-
156-
- [Route](https://docs.redhat.com/en/documentation/openshift_container_platform/4.14/html/network_apis/route-route-openshift-io-v1)
157-
158-
```yaml
159-
apiVersion: route.openshift.io/v1
160-
kind: Route
161-
```
162-
163-
修改 Agent 配置如下:
164-
165-
```yaml
166-
inputs:
167-
resources:
168-
kubernetes:
169-
api_resources:
170-
- name: ingresses
171-
disabled: true
172-
- name: routes
173-
```
174-
175-
在 Agent 所在容器集群中修改 Agent 的 ClusterRole 配置,增加如下规则:
176-
177-
```yaml
178-
rules:
179-
- apiGroups:
180-
- route.openshift.io
181-
resources:
182-
- routes
183-
verbs:
184-
- get
185-
- list
186-
- watch
187-
```
188-
189-
## OpenKruise
190-
191-
该场景下需要从 API 获取 `CloneSet` 和 `Advanced StatefulSet` 资源。
192-
193-
- [CloneSet](https://openkruise.io/docs/user-manuals/cloneset/)
194-
195-
```yaml
196-
apiVersion: apps.kruise.io/v1alpha1
197-
kind: CloneSet
198-
```
199-
200-
- [Advanced StatefulSet](https://openkruise.io/docs/user-manuals/advancedstatefulset/)
201-
202-
```yaml
203-
apiVersion: apps.kruise.io/v1beta1
204-
kind: StatefulSet
205-
```
206-
207-
修改 Agent 配置如下:
208-
209-
```yaml
210-
inputs:
211-
resources:
212-
kubernetes:
213-
api_resources:
214-
- name: clonesets
215-
group: apps.kruise.io
216-
- name: statefulsets
217-
group: apps
218-
- name: statefulsets
219-
group: apps.kruise.io
220-
```
221-
222-
::: tip
223-
由于 `statefulsets` 在 `apps` 和 `apps.kruise.io` 组中重名,如果需要同时获取 Kubernetes 的 `StatefulSet`,这里除配置 `group=apps.kruise.io, name=statefulsets` 资源同步外,需要同时开启 `group=apps, name=statefulsets` 的资源同步。
224-
:::
225-
226-
在 Agent 所在容器集群中修改 Agent 的 ClusterRole 配置,增加如下规则:
227-
228-
```yaml
229-
- apiGroups:
230-
- apps.kruise.io
231-
resources:
232-
- clonesets
233-
- statefulsets
234-
verbs:
235-
- get
236-
- list
237-
- watch
238-
```
239-
240-
## OpenGauss
241-
242-
该场景下需要从 API 获取 `OpenGaussCluster` 资源。
243-
244-
- [OpenGaussCluster](https://github.com/opengauss-mirror/openGauss-operator)
245-
246-
修改 Agent 配置如下:
247-
248-
```yaml
249-
inputs:
250-
resources:
251-
kubernetes:
252-
api_resources:
253-
- name: opengaussclusters
254-
```
255-
256-
在 Agent 所在容器集群中修改 Agent 的 ClusterRole 配置,增加如下规则:
257-
258-
```yaml
259-
- apiGroups:
260-
- opengauss.sig
261-
resources:
262-
- opengaussclusters
263-
verbs:
264-
- get
265-
- list
266-
- watch
267-
```
268141

269142
# K8s 运行 Agent 权限受限
270143

0 commit comments

Comments
 (0)