mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
add test to ensure that user can clear alwaysallowpaths
This commit is contained in:
parent
074a517720
commit
e86aa3ed23
@ -142,6 +142,7 @@ func TestAddFlags(t *testing.T) {
|
|||||||
args := []string{
|
args := []string{
|
||||||
"--address=192.168.4.10",
|
"--address=192.168.4.10",
|
||||||
"--allocate-node-cidrs=true",
|
"--allocate-node-cidrs=true",
|
||||||
|
"--authorization-always-allow-paths=", // this proves that we can clear the default
|
||||||
"--bind-address=192.168.4.21",
|
"--bind-address=192.168.4.21",
|
||||||
"--cert-dir=/a/b/c",
|
"--cert-dir=/a/b/c",
|
||||||
"--cloud-config=/cloud-config",
|
"--cloud-config=/cloud-config",
|
||||||
@ -257,7 +258,7 @@ func TestAddFlags(t *testing.T) {
|
|||||||
ClientTimeout: 10 * time.Second,
|
ClientTimeout: 10 * time.Second,
|
||||||
WebhookRetryBackoff: apiserveroptions.DefaultAuthWebhookRetryBackoff(),
|
WebhookRetryBackoff: apiserveroptions.DefaultAuthWebhookRetryBackoff(),
|
||||||
RemoteKubeConfigFileOptional: true,
|
RemoteKubeConfigFileOptional: true,
|
||||||
AlwaysAllowPaths: []string{"/healthz", "/readyz", "/livez"}, // note: this does not match /healthz/ or /healthz/*
|
AlwaysAllowPaths: []string{},
|
||||||
AlwaysAllowGroups: []string{"system:masters"},
|
AlwaysAllowGroups: []string{"system:masters"},
|
||||||
},
|
},
|
||||||
Kubeconfig: "/kubeconfig",
|
Kubeconfig: "/kubeconfig",
|
||||||
|
Loading…
Reference in New Issue
Block a user