Added support for kube-context flag, to specify kubernetes context (#1595)

This commit is contained in:
Rahul Bhati
2020-05-11 18:54:06 +05:30
committed by GitHub
parent 3e8cbe112f
commit 2d69542265
8 changed files with 26 additions and 20 deletions
+2 -2
View File
@@ -51,14 +51,14 @@ func (opts *TestSubCommand) do(input cli.Input) error {
Name: input.String(flagkey.FnName),
Namespace: input.String(flagkey.NamespaceFunction),
}
kubeContext := input.String(flagkey.KubeContext)
routerURL := os.Getenv("FISSION_ROUTER")
if len(routerURL) != 0 {
console.Warn("The environment variable FISSION_ROUTER is no longer supported for this command")
}
// Portforward to the fission router
localRouterPort, err := util.SetupPortForward(util.GetFissionNamespace(), "application=fission-router")
localRouterPort, err := util.SetupPortForward(util.GetFissionNamespace(), "application=fission-router", kubeContext)
if err != nil {
return err
}