From e86aa3ed23abccafa35dcc0ca250d8637a9b2063 Mon Sep 17 00:00:00 2001 From: David Eads Date: Wed, 3 Feb 2021 09:41:39 -0500 Subject: [PATCH] add test to ensure that user can clear alwaysallowpaths --- staging/src/k8s.io/cloud-provider/options/options_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/staging/src/k8s.io/cloud-provider/options/options_test.go b/staging/src/k8s.io/cloud-provider/options/options_test.go index 57f813b03f9..0a7ace3aab8 100644 --- a/staging/src/k8s.io/cloud-provider/options/options_test.go +++ b/staging/src/k8s.io/cloud-provider/options/options_test.go @@ -142,6 +142,7 @@ func TestAddFlags(t *testing.T) { args := []string{ "--address=192.168.4.10", "--allocate-node-cidrs=true", + "--authorization-always-allow-paths=", // this proves that we can clear the default "--bind-address=192.168.4.21", "--cert-dir=/a/b/c", "--cloud-config=/cloud-config", @@ -257,7 +258,7 @@ func TestAddFlags(t *testing.T) { ClientTimeout: 10 * time.Second, WebhookRetryBackoff: apiserveroptions.DefaultAuthWebhookRetryBackoff(), RemoteKubeConfigFileOptional: true, - AlwaysAllowPaths: []string{"/healthz", "/readyz", "/livez"}, // note: this does not match /healthz/ or /healthz/* + AlwaysAllowPaths: []string{}, AlwaysAllowGroups: []string{"system:masters"}, }, Kubeconfig: "/kubeconfig",