Inline namespace check and create const for label

* Inlines the namespace check for valid faasd namespaces
* Creates a const for the namespace label applied to faasd
namespaces

Tested with go build and go test.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2021-09-16 10:43:21 +01:00
parent 12b5e8ca7f
commit 5aa4c69e03
14 changed files with 41 additions and 37 deletions

View File

@ -88,7 +88,7 @@ func makeProviderCmd() *cobra.Command {
baseUserSecretsPath := path.Join(wd, "secrets")
if err := moveSecretsToDefaultNamespaceSecrets(
baseUserSecretsPath,
faasd.FunctionNamespace); err != nil {
faasd.DefaultFunctionNamespace); err != nil {
return err
}