Adds default resources for fetcher pod (#500)
The fetcher needs a relatively smaller set of resources and does not have to be same as the function container/defaults. This change adds defaults for fetcher containers in function pods.
This commit is contained in:
@@ -45,6 +45,7 @@ import (
|
||||
"github.com/fission/fission/environments/fetcher"
|
||||
fetcherClient "github.com/fission/fission/environments/fetcher/client"
|
||||
"github.com/fission/fission/executor/fscache"
|
||||
"github.com/fission/fission/executor/util"
|
||||
)
|
||||
|
||||
const POD_PHASE_RUNNING string = "Running"
|
||||
@@ -433,6 +434,11 @@ func (gp *GenericPool) createPool() error {
|
||||
poolDeploymentName := fmt.Sprintf("%v-%v-%v",
|
||||
gp.env.Metadata.Name, gp.env.Metadata.UID, strings.ToLower(gp.poolInstanceId))
|
||||
|
||||
fetcherResources, err := util.GetFetcherResources()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
deployment := &v1beta1.Deployment{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: poolDeploymentName,
|
||||
@@ -515,6 +521,7 @@ func (gp *GenericPool) createPool() error {
|
||||
MountPath: gp.sharedCfgMapPath,
|
||||
},
|
||||
},
|
||||
Resources: fetcherResources,
|
||||
Command: []string{"/fetcher",
|
||||
"-secret-dir", gp.sharedSecretPath,
|
||||
"-cfgmap-dir", gp.sharedCfgMapPath,
|
||||
|
||||
Reference in New Issue
Block a user