mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Set --audit-webhook-mode flag properly based on the env variable
This commit is contained in:
parent
0e31372b2f
commit
c4434855a6
@ -1593,8 +1593,6 @@ function start-kube-apiserver {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ "${ADVANCED_AUDIT_BACKEND:-}" == *"webhook"* ]]; then
|
if [[ "${ADVANCED_AUDIT_BACKEND:-}" == *"webhook"* ]]; then
|
||||||
params+=" --audit-webhook-mode=batch"
|
|
||||||
|
|
||||||
# Create the audit webhook config file, and mount it into the apiserver pod.
|
# Create the audit webhook config file, and mount it into the apiserver pod.
|
||||||
local -r audit_webhook_config_file="/etc/audit_webhook.config"
|
local -r audit_webhook_config_file="/etc/audit_webhook.config"
|
||||||
params+=" --audit-webhook-config-file=${audit_webhook_config_file}"
|
params+=" --audit-webhook-config-file=${audit_webhook_config_file}"
|
||||||
@ -1605,6 +1603,8 @@ function start-kube-apiserver {
|
|||||||
# Batching parameters
|
# Batching parameters
|
||||||
if [[ -n "${ADVANCED_AUDIT_WEBHOOK_MODE:-}" ]]; then
|
if [[ -n "${ADVANCED_AUDIT_WEBHOOK_MODE:-}" ]]; then
|
||||||
params+=" --audit-webhook-mode=${ADVANCED_AUDIT_WEBHOOK_MODE}"
|
params+=" --audit-webhook-mode=${ADVANCED_AUDIT_WEBHOOK_MODE}"
|
||||||
|
else
|
||||||
|
params+=" --audit-webhook-mode=batch"
|
||||||
fi
|
fi
|
||||||
if [[ -n "${ADVANCED_AUDIT_WEBHOOK_BUFFER_SIZE:-}" ]]; then
|
if [[ -n "${ADVANCED_AUDIT_WEBHOOK_BUFFER_SIZE:-}" ]]; then
|
||||||
params+=" --audit-webhook-batch-buffer-size=${ADVANCED_AUDIT_WEBHOOK_BUFFER_SIZE}"
|
params+=" --audit-webhook-batch-buffer-size=${ADVANCED_AUDIT_WEBHOOK_BUFFER_SIZE}"
|
||||||
|
Loading…
Reference in New Issue
Block a user