Fix fission check command doesnt work for namespace other than fission (#2932)

* Fix `fission check` command which does not work outside of `fission` namespace

If user provide namespace then use it for running `fission check` command.
If user does not provide namespace then use `fission` as default namespace.

* Update go version to 1.22.2

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
This commit is contained in:
soharab-ic
2024-05-07 11:18:22 +05:30
committed by GitHub
parent 63864a91f2
commit 241983d2f7
5 changed files with 26 additions and 9 deletions
+6 -2
View File
@@ -203,10 +203,14 @@ func (hc *HealthChecker) allCategories() []*Category {
}
}
func NewHealthChecker(cmd cmd.Client, categoryIDs []CategoryID) *HealthChecker {
func NewHealthChecker(cmd cmd.Client, categoryIDs []CategoryID, fissionNamespace string) *HealthChecker {
if fissionNamespace == "" {
fissionNamespace = util.FISSION_DEFAULT_NAMESPACE
}
hc := &HealthChecker{
kubeAPI: cmd.KubernetesClient,
fissionNamespace: "fission",
fissionNamespace: fissionNamespace,
}
hc.categories = hc.allCategories()