From 7500746e7f845c7ceaeb649226f803557bda2a54 Mon Sep 17 00:00:00 2001 From: Anthony Yeh Date: Thu, 9 Feb 2017 10:43:19 -0800 Subject: [PATCH] cluster/gce: Add env var to enable apiserver basic audit log. For now, this is focused on a fixed set of flags that makes the audit log show up under /var/log/kube-apiserver-audit.log and behave similarly to /var/log/kube-apiserver.log. Allowing other customization would require significantly more complex changes. Audit log rotation is handled externally by the wildcard /var/log/*.log already configured in configure-helper.sh. --- cluster/common.sh | 1 + cluster/gce/container-linux/configure-helper.sh | 16 ++++++++++++++++ cluster/gce/gci/configure-helper.sh | 16 ++++++++++++++++ cluster/gce/trusty/configure-helper.sh | 16 ++++++++++++++++ cluster/saltbase/salt/kube-apiserver/init.sls | 6 ++++++ .../salt/kube-apiserver/kube-apiserver.manifest | 14 +++++++++++++- cluster/saltbase/salt/logrotate/init.sls | 2 +- hack/verify-flags/exceptions.txt | 2 +- 8 files changed, 70 insertions(+), 3 deletions(-) diff --git a/cluster/common.sh b/cluster/common.sh index 6c64946399c..0f26e7be442 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -663,6 +663,7 @@ MULTIZONE: $(yaml-quote ${MULTIZONE:-}) NON_MASQUERADE_CIDR: $(yaml-quote ${NON_MASQUERADE_CIDR:-}) KUBE_UID: $(yaml-quote ${KUBE_UID:-}) ENABLE_DEFAULT_STORAGE_CLASS: $(yaml-quote ${ENABLE_DEFAULT_STORAGE_CLASS:-}) +ENABLE_APISERVER_BASIC_AUDIT: $(yaml-quote ${ENABLE_APISERVER_BASIC_AUDIT:-}) EOF if [ -n "${KUBELET_PORT:-}" ]; then cat >>$file <