From 130f5d10adf13492f3435ab85a50d357a6831f6e Mon Sep 17 00:00:00 2001 From: Cao Shufeng Date: Sun, 20 Aug 2017 11:27:34 +0800 Subject: [PATCH] set --audit-log-format default to json Updates: https://github.com/kubernetes/kubernetes/issues/48561 --- cmd/kube-apiserver/app/options/options_test.go | 2 +- staging/src/k8s.io/apiserver/pkg/server/options/audit.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kube-apiserver/app/options/options_test.go b/cmd/kube-apiserver/app/options/options_test.go index b96a878ec27..41b6c99ff0a 100644 --- a/cmd/kube-apiserver/app/options/options_test.go +++ b/cmd/kube-apiserver/app/options/options_test.go @@ -133,7 +133,7 @@ func TestAddFlagsFlag(t *testing.T) { MaxAge: 11, MaxBackups: 12, MaxSize: 13, - Format: "legacy", + Format: "json", }, WebhookOptions: apiserveroptions.AuditWebhookOptions{ Mode: "blocking", diff --git a/staging/src/k8s.io/apiserver/pkg/server/options/audit.go b/staging/src/k8s.io/apiserver/pkg/server/options/audit.go index 9e673848bea..a79bb5d7c61 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/options/audit.go +++ b/staging/src/k8s.io/apiserver/pkg/server/options/audit.go @@ -81,7 +81,7 @@ type AuditWebhookOptions struct { func NewAuditOptions() *AuditOptions { return &AuditOptions{ WebhookOptions: AuditWebhookOptions{Mode: pluginwebhook.ModeBatch}, - LogOptions: AuditLogOptions{Format: pluginlog.FormatLegacy}, + LogOptions: AuditLogOptions{Format: pluginlog.FormatJson}, } }