You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/tasks/debug/debug-cluster/audit.md
+35-11Lines changed: 35 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,28 +195,52 @@ the service and credentials used to connect to it.
195
195
196
196
## Event batching {#batching}
197
197
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.
202
201
202
+
{{< tabs name="tab_with_md" >}}
203
+
{{% tab name="webhook" %}}
203
204
- `--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.
206
207
- `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.
208
209
209
210
The following flags are used only in the `batch` mode:
210
211
211
212
- `--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.
214
215
- `--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.
216
218
- `--audit-webhook-batch-throttle-qps`defines the maximum average number of batches generated
217
-
per second.
219
+
per second. The default value is 10.
218
220
- `--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
219
241
moment if the allowed QPS was underutilized previously.
0 commit comments