Skip to content

Commit feecaca

Browse files
committed
[docs] fix bug
1 parent baaed2f commit feecaca

File tree

7 files changed

+110
-110
lines changed

7 files changed

+110
-110
lines changed

docs/zh/05-features/05-auto-tagging/08-k8s-crd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ inputs:
136136

137137
由于一些用户的 Kubernetes 环境可能具有特殊的配置或安全要求,使得标准化的提取工作负载类型和工作负载名称的方式无法按预期工作,或者用户可能希望根据自己的逻辑来定制工作负载类型和工作负载名称。基此,DeepFlow 支持用户通过添加自定义的 lua 插件提取工作负载类型和工作负载名称。Lua 插件系统通过在固定的地方调用 Lua Function 获取一些用户自定义的工作负载类型和名称,提高 K8s 资源对接的灵活性与普适性。
138138

139-
## lua 插件编写示例
139+
## Lua 插件编写示例
140140

141141
```lua
142142
-- 固定写法,以导入 json 解析的包

docs/zh/08-integration/01-process/02-lua-plugin.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/zh/10-release-notes/05-ce-6.6-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ permalink: /release-notes/release-6.6-ce
158158
- AutoTracing
159159
- 调用链追踪火焰图自动校正不同机器的细微时钟偏差。
160160
- AutoTagging
161-
- 支持利用 Lua Plugin 自定义 K8s 工作负载抽象规则,[文档](../integration/process/lua-plugin/)
161+
- 支持利用 Lua Plugin 自定义 K8s 工作负载抽象规则,[文档](../features/auto-tagging/k8s-crd/)
162162
- 支持同步 LoadBalancer 类型的容器服务。
163163
- Server
164164
- 支持使用 OceanBase 替换 MySQL。
@@ -171,7 +171,7 @@ permalink: /release-notes/release-6.6-ce
171171
- 当协议头中存在 TraceID 时,支持关闭 eBPF syscall_trace_id 计算(通过配置 `syscall_trace_id_disabled`),以降低对业务性能的影响。
172172
- 调用链追踪火焰图自动校正不同机器的细微时钟偏差。
173173
- AutoTagging
174-
- 支持利用 Lua Plugin 自定义 K8s 工作负载抽象规则,[文档](../integration/process/lua-plugin/)
174+
- 支持利用 Lua Plugin 自定义 K8s 工作负载抽象规则,[文档](../features/auto-tagging/k8s-crd/)
175175
- Agent
176176
- 支持完全关闭 cBPF 数据采集(通过配置 `tap_interface_regex` 为空字符串),以降低内存开销。
177177
- 支持 deepflow-agent 使用一个 Socket 传输所有观测数据,并可通过 `multiple_sockets_to_ingester` 配置项关闭此特性从而使用多个 Socket 以提升传输性能。

docs/zh/10-release-notes/06-ee-6.6-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ N/A
213213
- 默认采集容器中的进程信息。
214214
- 管理能力
215215
- 录入 K8s 集群时支持指定 ClusterID,使得集群重新录入时可复用旧 ClusterID。
216-
- 支持利用 Lua Plugin 自定义 K8s 工作负载抽象规则,[文档](../integration/process/lua-plugin/)
216+
- 支持利用 Lua Plugin 自定义 K8s 工作负载抽象规则,[文档](../features/auto-tagging/k8s-crd/)
217217
- 限制同一组织同一区域内仅支持一个`采集器同步`类型的云平台。
218218
- 支持通过普通账号的 AK/SK、携带 ResourceGroupId 完成阿里云资源同步。
219219
- 预置资源同步滞后、资源关联关系异常的系统告警。

translate/translated/04-best-practice/03-special-environment-deployment.md

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -129,99 +129,6 @@ The only thing to note is that the tap_interface_regex of the collector only nee
129129

130130
The only thing to note is that the tap_interface_regex of the collector only needs to be configured as the Node NIC list.
131131

132-
# Special K8s Resources or CRD
133-
134-
In these scenarios, the following operations are required:
135-
136-
- Enable and disable the corresponding resources in the Agent advanced configuration
137-
- Configure Kubernetes API permissions
138-
139-
## OpenShift
140-
141-
In this scenario, the default `Ingress` resource acquisition needs to be disabled, and the `Route` resource acquisition needs to be enabled.
142-
143-
Agent advanced configuration is as follows:
144-
145-
```yaml
146-
static_config:
147-
kubernetes-resources:
148-
- name: ingresses
149-
disabled: true
150-
- name: routes
151-
```
152-
153-
ClusterRole configuration addition:
154-
155-
```yaml
156-
rules:
157-
- apiGroups:
158-
- route.openshift.io
159-
resources:
160-
- routes
161-
verbs:
162-
- get
163-
- list
164-
- watch
165-
```
166-
167-
## OpenKruise
168-
169-
In this scenario, the `CloneSet` and `apps.kruise.io/StatefulSet` resources need to be obtained from the API.
170-
171-
Agent advanced configuration is as follows:
172-
173-
```yaml
174-
static_config:
175-
kubernetes-resources:
176-
- name: clonesets
177-
group: apps.kruise.io
178-
- name: statefulsets
179-
group: apps
180-
- name: statefulsets
181-
group: apps.kruise.io
182-
```
183-
184-
Note that Kubernetes's `apps/StatefulSet` needs to be added here.
185-
186-
ClusterRole configuration addition:
187-
188-
```yaml
189-
- apiGroups:
190-
- apps.kruise.io
191-
resources:
192-
- clonesets
193-
- statefulsets
194-
verbs:
195-
- get
196-
- list
197-
- watch
198-
```
199-
200-
## OpenGauss
201-
202-
In this scenario, the `OpenGaussCluster` resource needs to be obtained from the API.
203-
204-
Agent advanced configuration is as follows:
205-
206-
```yaml
207-
static_config:
208-
kubernetes-resources:
209-
- name: opengaussclusters
210-
```
211-
212-
ClusterRole configuration addition:
213-
214-
```yaml
215-
- apiGroups:
216-
- opengauss.sig
217-
resources:
218-
- opengaussclusters
219-
verbs:
220-
- get
221-
- list
222-
- watch
223-
```
224-
225132
# Limited Permissions for Running Agent in K8s
226133

227134
## No Permission to Deploy K8s Daemonset

translate/translated/08-integration/01-process/02-lua-plugin.md renamed to translate/translated/05-features/05-auto-tagging/08-k8s-crd.md

Lines changed: 105 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,113 @@
11
---
2-
title: Lua plugin
3-
permalink: /integration/process/lua-plugin
2+
title: Business Tags in CMDB
3+
permalink: /features/auto-tagging/k8s-crd
44
---
55

66
> This document was translated by ChatGPT
77
8-
# About Lua Plugin
8+
# Common special K8s resources or CRDs
9+
10+
When an unsynchronized (workload-unassociated) container Pod is detected:
11+
- If the value of Pod's `metadata.ownerReferences[].apiVersion = apps.kruise.io/v1beta1`, then the corresponding K8s platform should be OpenKruise.
12+
- If the value of Pod's `metadata.ownerReferences[].apiVersion = opengauss.sig/v1`, then the corresponding K8s platform should be OpenGauss.
13+
14+
In these scenarios, the following operations are required:
15+
16+
- Enable and disable the corresponding resources in the Agent advanced configuration
17+
- Configure Kubernetes API permissions
18+
19+
## OpenShift
20+
21+
In this scenario, the default `Ingress` resource acquisition needs to be disabled, and the `Route` resource acquisition needs to be enabled.
22+
23+
Agent advanced configuration is as follows:
24+
25+
```yaml
26+
static_config:
27+
kubernetes-resources:
28+
- name: ingresses
29+
disabled: true
30+
- name: routes
31+
```
32+
33+
ClusterRole configuration addition:
34+
35+
```yaml
36+
rules:
37+
- apiGroups:
38+
- route.openshift.io
39+
resources:
40+
- routes
41+
verbs:
42+
- get
43+
- list
44+
- watch
45+
```
46+
47+
## OpenKruise
48+
49+
In this scenario, the `CloneSet` and `apps.kruise.io/StatefulSet` resources need to be obtained from the API.
50+
51+
Agent advanced configuration is as follows:
52+
53+
```yaml
54+
static_config:
55+
kubernetes-resources:
56+
- name: clonesets
57+
group: apps.kruise.io
58+
- name: statefulsets
59+
group: apps
60+
- name: statefulsets
61+
group: apps.kruise.io
62+
```
63+
64+
Note that Kubernetes's `apps/StatefulSet` needs to be added here.
65+
66+
ClusterRole configuration addition:
67+
68+
```yaml
69+
- apiGroups:
70+
- apps.kruise.io
71+
resources:
72+
- clonesets
73+
- statefulsets
74+
verbs:
75+
- get
76+
- list
77+
- watch
78+
```
79+
80+
## OpenGauss
81+
82+
In this scenario, the `OpenGaussCluster` resource needs to be obtained from the API.
83+
84+
Agent advanced configuration is as follows:
85+
86+
```yaml
87+
static_config:
88+
kubernetes-resources:
89+
- name: opengaussclusters
90+
```
91+
92+
ClusterRole configuration addition:
93+
94+
```yaml
95+
- apiGroups:
96+
- opengauss.sig
97+
resources:
98+
- opengaussclusters
99+
verbs:
100+
- get
101+
- list
102+
- watch
103+
```
104+
105+
# Other K8s CRD
106+
## About Lua Plugin
9107

10108
Due to some users' Kubernetes environments possibly having special configurations or security requirements, the standardized way of extracting workload types and workload names may not work as expected. Alternatively, users might want to customize workload types and workload names based on their own logic. Therefore, DeepFlow supports users in extracting workload types and workload names by adding custom Lua plugins. The Lua plugin system enhances the flexibility and universality of K8s resource integration by calling Lua Functions at fixed points to obtain some user-defined workload types and names.
11109

12-
# Lua Plugin Writing Example
110+
## Lua Plugin Writing Example
13111

14112
```lua
15113
-- Fixed syntax to import the JSON parsing package
@@ -62,7 +160,7 @@ function GetWorkloadTypeAndName(metaJsonStr)
62160
end
63161
```
64162

65-
# Upload Plugin
163+
## Upload Plugin
66164

67165
Lua plugins support runtime loading. After uploading the plugin using the deepflow-ctl tool in the DeepFlow runtime environment, it will be automatically loaded. Execute the following command in the environment:
68166

@@ -83,7 +181,7 @@ You can delete a specific plugin by its name with the following command:
83181
deepflow-ctl plugin delete <name>
84182
```
85183

86-
# Example
184+
## Example
87185

88186
For instance, if the metadata of a Pod in the current k8s environment is as follows:
89187

@@ -139,4 +237,4 @@ function GetWorkloadTypeAndName(metaJsonStr)
139237
end
140238
```
141239

142-
After uploading this plugin, you can extract the corresponding workload type and workload name for this Pod.
240+
After uploading this plugin, you can extract the corresponding workload type and workload name for this Pod.

translate/translated/10-release-notes/03-ce-6.6-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permalink: /release-notes/release-6.6-ce
1313
- When the TraceID is present in the protocol header, support disabling eBPF syscall_trace_id calculation (via configuration `syscall_trace_id_disabled`) to reduce the impact on business performance.
1414
- Automatically correct minor clock deviations between different machines in the distributed tracing flame graph.
1515
- AutoTagging
16-
- Support using Lua Plugin to customize K8s workload abstraction rules, [documentation](../integration/process/lua-plugin/).
16+
- Support using Lua Plugin to customize K8s workload abstraction rules, [documentation](../features/auto-tagging/k8s-crd/).
1717
- Agent
1818
- Support completely disabling cBPF data collection (via configuration `tap_interface_regex` as an empty string) to reduce memory overhead.
1919
- Support deepflow-agent to use a single socket to transmit all observability data, and this feature can be disabled via the `multiple_sockets_to_ingester` configuration item to use multiple sockets to improve transmission performance.

0 commit comments

Comments
 (0)