From 4f46649bc127948a38f41079513220e48f1aa119 Mon Sep 17 00:00:00 2001 From: chankyin Date: Fri, 1 Nov 2024 10:59:53 +0800 Subject: [PATCH] fix(webhook): incorrect audit-webhook-subscriber-queue-capacity argument handling --- pkg/audit/webhook/webhook.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/audit/webhook/webhook.go b/pkg/audit/webhook/webhook.go index 7f68e942..3001ff20 100644 --- a/pkg/audit/webhook/webhook.go +++ b/pkg/audit/webhook/webhook.go @@ -46,10 +46,10 @@ type options struct { func (options *options) Setup(fs *pflag.FlagSet) { fs.BoolVar(&options.enable, "audit-webhook-enable", false, "enable audit webhook") - fs.BoolVar( - &options.enable, + fs.IntVar( + &options.subscriberQueueCapacity, "audit-webhook-subscriber-queue-capacity", - false, + 0, "maximum number of events buffered in the webhook, set to 0 for an unbounded buffer (may cause OOM)", ) }