mirror of
https://github.com/openfaas/faas.git
synced 2025-06-10 09:16:48 +00:00
Remove code duplicated during a rebase
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
This commit is contained in:
parent
156103e2db
commit
fe7dd9068f
@ -82,12 +82,6 @@ func makeSpec(request *requests.CreateFunctionRequest, maxRestarts uint64, resta
|
|||||||
} else {
|
} else {
|
||||||
constraints = linuxOnlyConstraints
|
constraints = linuxOnlyConstraints
|
||||||
}
|
}
|
||||||
labels := map[string]string{"function": "true"}
|
|
||||||
if request.Labels != nil {
|
|
||||||
for k, v := range request.Labels {
|
|
||||||
labels[k] = v
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
labels := map[string]string{
|
labels := map[string]string{
|
||||||
"com.openfaas.function": request.Service,
|
"com.openfaas.function": request.Service,
|
||||||
@ -135,10 +129,6 @@ func makeSpec(request *requests.CreateFunctionRequest, maxRestarts uint64, resta
|
|||||||
Replicas: getMinReplicas(request),
|
Replicas: getMinReplicas(request),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Annotations: swarm.Annotations{
|
|
||||||
Name: request.Service,
|
|
||||||
Labels: labels,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: request.EnvProcess should only be set if it's not nil, otherwise we override anything in the Docker image already
|
// TODO: request.EnvProcess should only be set if it's not nil, otherwise we override anything in the Docker image already
|
||||||
|
@ -21,9 +21,6 @@ type CreateFunctionRequest struct {
|
|||||||
// EnvVars provides overrides for functions.
|
// EnvVars provides overrides for functions.
|
||||||
EnvVars map[string]string `json:"envVars"`
|
EnvVars map[string]string `json:"envVars"`
|
||||||
|
|
||||||
// Secrets is a list of secrets required for the orchestration layer to provide
|
|
||||||
Secrets []string `json:"secrets"`
|
|
||||||
|
|
||||||
// RegistryAuth is the registry authentication (optional)
|
// RegistryAuth is the registry authentication (optional)
|
||||||
// in the same encoded format as Docker native credentials
|
// in the same encoded format as Docker native credentials
|
||||||
// (see ~/.docker/config.json)
|
// (see ~/.docker/config.json)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user