Skip to content

Commit cc8fd81

Browse files
use tabs to list flags specific to each backend in a separate tab.
1 parent c8426e5 commit cc8fd81

File tree

1 file changed

+35
-11
lines changed
  • content/en/docs/tasks/debug/debug-cluster

1 file changed

+35
-11
lines changed

content/en/docs/tasks/debug/debug-cluster/audit.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,28 +195,52 @@ the service and credentials used to connect to it.
195195

196196
## Event batching {#batching}
197197

198-
Both log and webhook backends support batching. Using webhook as an example, here's the list of
199-
available flags. To get the same flag for log backend, replace `webhook` with `log` in the flag
200-
name. By default, batching is enabled in `webhook` and disabled in `log`. Similarly, by default
201-
throttling is enabled in `webhook` and disabled in `log`.
198+
Both `log` and `webhook` backends support batching. Below is a list of
199+
available flags specific to each backend.
200+
By default, batching and throttling are **enabled** for the `webhook` backend and **disabled** for the `log` backend.
202201

202+
{{< tabs name="tab_with_md" >}}
203+
{{% tab name="webhook" %}}
203204
- `--audit-webhook-mode` defines the buffering strategy. One of the following:
204-
- `batch` - buffer events and asynchronously process them in batches. This is the default mode for `webhook` backend.
205-
- `blocking` - block API server responses on processing each individual event. This is the default mode for `log` backend.
205+
- `batch` - buffer events and asynchronously process them in batches. This is the default mode for the `webhook` backend.
206+
- `blocking` - block API server responses on processing each individual event.
206207
- `blocking-strict` - Same as blocking, but when there is a failure during audit logging at the
207-
RequestReceived stage, the whole request to the kube-apiserver fails.
208+
RequestReceived stage, the whole request to the kube-apiserver fails.
208209

209210
The following flags are used only in the `batch` mode:
210211

211212
- `--audit-webhook-batch-buffer-size` defines the number of events to buffer before batching.
212-
If the rate of incoming events overflows the buffer, events are dropped.
213-
- `--audit-webhook-batch-max-size` defines the maximum number of events in one batch.
213+
If the rate of incoming events overflows the buffer, events are dropped. The default value is 10000.
214+
- `--audit-webhook-batch-max-size` defines the maximum number of events in one batch. The default value is 400.
214215
- `--audit-webhook-batch-max-wait` defines the maximum amount of time to wait before unconditionally
215-
batching events in the queue.
216+
batching events in the queue. The default value is 30 seconds.
217+
- `--audit-webhook-batch-throttle-enable` defines whether batching throttling is enabled. Throttling is enabled by default.
216218
- `--audit-webhook-batch-throttle-qps` defines the maximum average number of batches generated
217-
per second.
219+
per second. The default value is 10.
218220
- `--audit-webhook-batch-throttle-burst` defines the maximum number of batches generated at the same
221+
moment if the allowed QPS was underutilized previously. The default value is 15.
222+
{{% /tab %}}
223+
{{% tab name="log" %}}
224+
- `--audit-log-mode` defines the buffering strategy. One of the following:
225+
- `batch` - buffer events and asynchronously process them in batches. Batching is not recommended for the `log` backend.
226+
- `blocking` - block API server responses on processing each individual event. This is the default mode for the `log` backend.
227+
- `blocking-strict` - Same as blocking, but when there is a failure during audit logging at the
228+
RequestReceived stage, the whole request to the kube-apiserver fails.
229+
230+
The following flags are used only in the `batch` mode (batching is **disabled** by default for the `log` backend, and when batching is disabled, all batching-related flags are ignored):
231+
232+
- `--audit-log-batch-buffer-size` defines the number of events to buffer before batching.
233+
If the rate of incoming events overflows the buffer, events are dropped.
234+
- `--audit-log-batch-max-size` defines the maximum number of events in one batch.
235+
- `--audit-log-batch-max-wait` defines the maximum amount of time to wait before unconditionally
236+
batching events in the queue.
237+
- `--audit-log-batch-throttle-enable` defines whether batching throttling is enabled.
238+
- `--audit-log-batch-throttle-qps` defines the maximum average number of batches generated
239+
per second.
240+
- `--audit-log-batch-throttle-burst` defines the maximum number of batches generated at the same
219241
moment if the allowed QPS was underutilized previously.
242+
{{% /tab %}}
243+
{{< /tabs >}}
220244

221245
## Parameter tuning
222246

0 commit comments

Comments
 (0)