From ced39bcda7e42c481f59689fa3cd95ba4a57bb34 Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Thu, 28 Jun 2018 23:19:11 +0530 Subject: [PATCH] Updated default secret mount path value This changes updates the secret mount path default value to /var/openfaas/secrets at serveral places. It has been changed from /run/secrets/ to /var/openfaas/secrets after version 0.8.2 Signed-off-by: Vivek Singh --- docker-compose.armhf.yml | 2 +- docker-compose.yml | 2 +- gateway/README.md | 2 +- gateway/types/readconfig.go | 2 +- gateway/types/readconfig_test.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose.armhf.yml b/docker-compose.armhf.yml index 8145d9c1..41e89a15 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: "/run/secrets/" + secret_mount_path: "/var/openfaas/secrets/" deploy: resources: # limits: # uncomment to enable limits diff --git a/docker-compose.yml b/docker-compose.yml index d7d1cf71..c7ef749b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: direct_functions: "true" # Functions are invoked directly over the overlay network direct_functions_suffix: "" basic_auth: "false" - secret_mount_path: "/run/secrets/" + secret_mount_path: "/var/openfaas/secrets/" deploy: resources: # limits: # Enable if you want to limit memory usage diff --git a/gateway/README.md b/gateway/README.md index c1cf047b..c67f146b 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: `/run/secrets/`. | +| `secret_mount_path` | Set a location where you have mounted `basic-auth-user` and `basic-auth-password`, default: `/var/openfaas/secrets/`. | diff --git a/gateway/types/readconfig.go b/gateway/types/readconfig.go index 115c9d59..d6b732bd 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 = "/run/secrets/" + secretPath = "/var/openfaas/secrets/" } cfg.SecretMountPath = secretPath diff --git a/gateway/types/readconfig_test.go b/gateway/types/readconfig_test.go index f1a09489..cc5a3252 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 := "/run/secrets/" + wantSecretsMount := "/var/openfaas/secrets/" if config.SecretMountPath != wantSecretsMount { t.Logf("config.SecretMountPath, want: %s, got: %s\n", wantSecretsMount, config.SecretMountPath) t.Fail()