Retrieve pod metrics only if metrics server is running and Go lint fixes (#2094)

* Retrieve pod metrics only if metrics server is running

Currently we query pod metrics every 30 sec which floods executor logs,
added check which confirms if metrics server is running then only we start
querying pod metrics for identifying CPU utilization.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Fixed couple of typos and misspells with Go CI

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Remove unnecessary conversions with Go CI

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2021-06-28 10:06:32 +05:30
committed by GitHub
parent a493f0117d
commit 154fe0d447
21 changed files with 105 additions and 39 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ func createEnvironmentFromCmd(input cli.Input) (*fv1.Environment, error) {
poolsize := input.Int(flagkey.EnvPoolsize)
if poolsize < 1 {
console.Warn("poolsize is not positive, if you are using pool manager please set postive value")
console.Warn("poolsize is not positive, if you are using pool manager please set positive value")
}
envBuilderImg := input.String(flagkey.EnvBuilderImage)
+1 -1
View File
@@ -105,7 +105,7 @@ func updateExistingEnvironmentWithCmd(env *fv1.Environment, input cli.Input) (*f
if input.IsSet(flagkey.EnvPoolsize) {
env.Spec.Poolsize = input.Int(flagkey.EnvPoolsize)
if env.Spec.Poolsize < 1 {
console.Warn("poolsize is not positive, if you are using pool manager please set postive value")
console.Warn("poolsize is not positive, if you are using pool manager please set positive value")
}
}
+1 -1
View File
@@ -28,6 +28,7 @@ import (
"github.com/hashicorp/go-multierror"
"github.com/mholt/archiver"
"github.com/pkg/errors"
uuid "github.com/satori/go.uuid"
fv1 "github.com/fission/fission/pkg/apis/core/v1"
"github.com/fission/fission/pkg/controller/client"
@@ -39,7 +40,6 @@ import (
flagkey "github.com/fission/fission/pkg/fission-cli/flag/key"
"github.com/fission/fission/pkg/fission-cli/util"
"github.com/fission/fission/pkg/utils"
uuid "github.com/satori/go.uuid"
)
// CreateArchive returns a fv1.Archive made from an archive . If specFile, then