From e55c018c17fb758de06b161da5a7398542215a36 Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Mon, 2 Jul 2018 00:37:58 +0530 Subject: [PATCH] Update default secret mount path to /run/secrets/ This commit reverts the changes done in #738 to update the default secret mount path to `/run/secrets/` Signed-off-by: Vivek Singh --- docker-compose.armhf.yml | 2 +- gateway/README.md | 2 +- gateway/types/readconfig.go | 2 +- gateway/types/readconfig_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.armhf.yml b/docker-compose.armhf.yml index 41e89a15..8145d9c1 100644 --- a/docker-compose.armhf.yml +++ b/docker-compose.armhf.yml @@ -16,7 +16,7 @@ services: direct_functions: "true" # Functions are invoked directly over the overlay network direct_functions_suffix: "" basic_auth: "false" - secret_mount_path: "/var/openfaas/secrets/" + secret_mount_path: "/run/secrets/" deploy: resources: # limits: # uncomment to enable limits diff --git a/gateway/README.md b/gateway/README.md index c67f146b..c1cf047b 100644 --- a/gateway/README.md +++ b/gateway/README.md @@ -55,4 +55,4 @@ The gateway can be configured through the following environment variables: | `direct_functions` | `true` or `false` - functions are invoked directly over overlay network without passing through provider | | `direct_functions_suffix` | Provide a DNS suffix for invoking functions directly over overlay network | | `basic_auth` | Set to `true` or `false` to enable embedded basic auth on the /system and /ui endpoints (recommended) | -| `secret_mount_path` | Set a location where you have mounted `basic-auth-user` and `basic-auth-password`, default: `/var/openfaas/secrets/`. | +| `secret_mount_path` | Set a location where you have mounted `basic-auth-user` and `basic-auth-password`, default: `/run/secrets/`. | diff --git a/gateway/types/readconfig.go b/gateway/types/readconfig.go index d6b732bd..115c9d59 100644 --- a/gateway/types/readconfig.go +++ b/gateway/types/readconfig.go @@ -109,7 +109,7 @@ func (ReadConfig) Read(hasEnv HasEnv) GatewayConfig { secretPath := hasEnv.Getenv("secret_mount_path") if len(secretPath) == 0 { - secretPath = "/var/openfaas/secrets/" + secretPath = "/run/secrets/" } cfg.SecretMountPath = secretPath diff --git a/gateway/types/readconfig_test.go b/gateway/types/readconfig_test.go index cc5a3252..f1a09489 100644 --- a/gateway/types/readconfig_test.go +++ b/gateway/types/readconfig_test.go @@ -210,7 +210,7 @@ func TestRead_BasicAuthDefaults(t *testing.T) { t.Fail() } - wantSecretsMount := "/var/openfaas/secrets/" + wantSecretsMount := "/run/secrets/" if config.SecretMountPath != wantSecretsMount { t.Logf("config.SecretMountPath, want: %s, got: %s\n", wantSecretsMount, config.SecretMountPath) t.Fail()