From c4434855a63d48e8991ebda5346a4aa16d5b7afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20K=C5=82obuszewski?= Date: Wed, 22 Aug 2018 15:25:26 +0200 Subject: [PATCH] Set --audit-webhook-mode flag properly based on the env variable --- cluster/gce/gci/configure-helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 8afe1d6a02..bb9568e969 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -1593,8 +1593,6 @@ function start-kube-apiserver { fi fi if [[ "${ADVANCED_AUDIT_BACKEND:-}" == *"webhook"* ]]; then - params+=" --audit-webhook-mode=batch" - # Create the audit webhook config file, and mount it into the apiserver pod. local -r audit_webhook_config_file="/etc/audit_webhook.config" params+=" --audit-webhook-config-file=${audit_webhook_config_file}" @@ -1605,6 +1603,8 @@ function start-kube-apiserver { # Batching parameters if [[ -n "${ADVANCED_AUDIT_WEBHOOK_MODE:-}" ]]; then params+=" --audit-webhook-mode=${ADVANCED_AUDIT_WEBHOOK_MODE}" + else + params+=" --audit-webhook-mode=batch" fi if [[ -n "${ADVANCED_AUDIT_WEBHOOK_BUFFER_SIZE:-}" ]]; then params+=" --audit-webhook-batch-buffer-size=${ADVANCED_AUDIT_WEBHOOK_BUFFER_SIZE}"