Skip to content

Commit bf0f04d

Browse files
authored
Merge pull request #36582 from yanrongshi/zh-cn]Sync-docs/tasks/debug/debug-cluster/audit.md
[zh-cn]Sync audit.md
2 parents 9c5b45d + 46e2bb7 commit bf0f04d

File tree

1 file changed

+17
-10
lines changed
  • content/zh-cn/docs/tasks/debug/debug-cluster

1 file changed

+17
-10
lines changed

content/zh-cn/docs/tasks/debug/debug-cluster/audit.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ API 对象不同。
9898
<!--
9999
The audit logging feature increases the memory consumption of the API server
100100
because some context required for auditing is stored for each request.
101-
Additionally, memory consumption depends on the audit logging configuration.
101+
Memory consumption depends on the audit logging configuration.
102102
-->
103103
审计日志记录功能会增加 API server 的内存消耗,因为需要为每个请求存储审计所需的某些上下文。
104-
此外,内存消耗取决于审计日志记录的配置。
104+
内存消耗取决于审计日志记录的配置。
105105

106106
<!--
107-
## Audit Policy
107+
## Audit policy
108108
109109
Audit policy defines rules about what events should be recorded and what data
110110
they should include. The audit policy object structure is defined in the
@@ -169,7 +169,7 @@ rules:
169169
<!--
170170
If you're crafting your own audit profile, you can use the audit profile for Google Container-Optimized OS as a starting point. You can check the
171171
[configure-helper.sh](https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/gci/configure-helper.sh)
172-
script, which generates the audit policy file. You can see most of the audit policy file by looking directly at the script.
172+
script, which generates an audit policy file. You can see most of the audit policy file by looking directly at the script.
173173
174174
You can also refer to the [`Policy` configuration reference](/docs/reference/config-api/apiserver-audit.v1/#audit-k8s-io-v1-Policy)
175175
for details about the fields defined.
@@ -266,13 +266,14 @@ to the location of the policy file and log file, so that audit records are persi
266266
卷来访问策略文件和日志文件所在的目录,这样审计记录才会持久保存下来。例如:
267267

268268
```shell
269-
--audit-policy-file=/etc/kubernetes/audit-policy.yaml
270-
--audit-log-path=/var/log/kubernetes/audit/audit.log
269+
--audit-policy-file=/etc/kubernetes/audit-policy.yaml \
270+
--audit-log-path=/var/log/kubernetes/audit/audit.log
271271
```
272272

273273
接下来挂载数据卷:
274274

275275
```yaml
276+
...
276277
volumeMounts:
277278
- mountPath: /etc/kubernetes/audit-policy.yaml
278279
name: audit
@@ -359,7 +360,7 @@ throttling is enabled in `webhook` and disabled in `log`.
359360
失败时,整个 API 服务请求会失效。
360361

361362
<!--
362-
The following flags are used only in the `batch` mode.
363+
The following flags are used only in the `batch` mode:
363364

364365
- `--audit-webhook-batch-buffer-size` defines the number of events to buffer before batching.
365366
If the rate of incoming events overflows the buffer, events are dropped.
@@ -371,7 +372,7 @@ The following flags are used only in the `batch` mode.
371372
- `--audit-webhook-batch-throttle-burst` defines the maximum number of batches generated at the same
372373
moment if the allowed QPS was underutilized previously.
373374
-->
374-
以下参数仅用于 `batch` 模式
375+
以下参数仅用于 `batch` 模式
375376

376377
- `--audit-webhook-batch-buffer-size` 定义 batch 之前要缓存的事件数。
377378
如果传入事件的速率溢出缓存区,则会丢弃事件。
@@ -444,9 +445,15 @@ By default truncate is disabled in both `webhook` and `log`, a cluster administr
444445
默认情况下,截断操作在 `webhook` 和 `log` 后端都是被禁用的,集群管理员需要设置
445446
`audit-log-truncate-enabled` 或 `audit-webhook-truncate-enabled` 标志来启用此操作。
446447

447-
## {{% heading "whatsnext" %}}
448+
## {{% heading "接下来" %}}
448449

449450
<!--
450451
* Learn about [Mutating webhook auditing annotations](/docs/reference/access-authn-authz/extensible-admission-controllers/#mutating-webhook-auditing-annotations).
452+
* Learn more about [`Event`](/docs/reference/config-api/apiserver-audit.v1/#audit-k8s-io-v1-Event)
453+
and the [`Policy`](/docs/reference/config-api/apiserver-audit.v1/#audit-k8s-io-v1-Policy)
454+
resource types by reading the Audit configuration reference.
451455
-->
452-
* 了解 [Mutating webhook 审计注解](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/#mutating-webhook-auditing-annotations)。
456+
* 进一步了解 [Mutating webhook 审计注解](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/#mutating-webhook-auditing-annotations)。
457+
* 通过阅读审计配置参考,进一步了解
458+
[`Event`](/docs/reference/config-api/apiserver-audit.v1/#audit-k8s-io-v1-Event)
459+
和 [`Policy`](/docs/reference/config-api/apiserver-audit.v1/#audit-k8s-io-v1-Policy) 资源的信息。

0 commit comments

Comments
 (0)