From 13412841aa2e23145bb1a304b44767ab1275f28a Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Wed, 15 Sep 2021 15:51:43 +0100 Subject: [PATCH] Rename getMounts to getOSMounts A more descriptive name Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- pkg/provider/handlers/deploy.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/provider/handlers/deploy.go b/pkg/provider/handlers/deploy.go index 2065436..7587c4d 100644 --- a/pkg/provider/handlers/deploy.go +++ b/pkg/provider/handlers/deploy.go @@ -111,7 +111,7 @@ func deploy(ctx context.Context, req types.FunctionDeployment, client *container } envs := prepareEnv(req.EnvProcess, req.EnvVars) - mounts := getMounts() + mounts := getOSMounts() for _, secret := range req.Secrets { mounts = append(mounts, specs.Mount{ @@ -126,7 +126,7 @@ func deploy(ctx context.Context, req types.FunctionDeployment, client *container labels, err := buildLabels(&req) if err != nil { - return fmt.Errorf("Unable to apply labels to conatiner: %s, error: %s", name, err) + return fmt.Errorf("Unable to apply labels to container: %s, error: %s", name, err) } var memory *specs.LinuxMemory @@ -247,7 +247,9 @@ func prepareEnv(envProcess string, reqEnvVars map[string]string) []string { return envs } -func getMounts() []specs.Mount { +// getOSMounts provides a mount for os-specific files such +// as the hosts file and resolv.conf +func getOSMounts() []specs.Mount { // Prior to hosts_dir env-var, this value was set to // os.Getwd() hostsDir := "/var/lib/faasd"