mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-08 16:06:47 +00:00
Rename getMounts to getOSMounts
A more descriptive name Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
parent
e76d0d34ba
commit
13412841aa
@ -111,7 +111,7 @@ func deploy(ctx context.Context, req types.FunctionDeployment, client *container
|
|||||||
}
|
}
|
||||||
|
|
||||||
envs := prepareEnv(req.EnvProcess, req.EnvVars)
|
envs := prepareEnv(req.EnvProcess, req.EnvVars)
|
||||||
mounts := getMounts()
|
mounts := getOSMounts()
|
||||||
|
|
||||||
for _, secret := range req.Secrets {
|
for _, secret := range req.Secrets {
|
||||||
mounts = append(mounts, specs.Mount{
|
mounts = append(mounts, specs.Mount{
|
||||||
@ -126,7 +126,7 @@ func deploy(ctx context.Context, req types.FunctionDeployment, client *container
|
|||||||
|
|
||||||
labels, err := buildLabels(&req)
|
labels, err := buildLabels(&req)
|
||||||
if err != nil {
|
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
|
var memory *specs.LinuxMemory
|
||||||
@ -247,7 +247,9 @@ func prepareEnv(envProcess string, reqEnvVars map[string]string) []string {
|
|||||||
return envs
|
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
|
// Prior to hosts_dir env-var, this value was set to
|
||||||
// os.Getwd()
|
// os.Getwd()
|
||||||
hostsDir := "/var/lib/faasd"
|
hostsDir := "/var/lib/faasd"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user