Use Kubernetes Client instead of Controller APIs from CLI (#2605)
Use the Kubernetes and Fission Client from CLI instead of Controller API. This removes port-forwarding for the controller across Fission CLI mostly. * Use configurable client in CLI * Move resource namespace under cmd client * use server to get fission version * get archive with URL Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
co-authored by
Sanket Sudake
parent
261bf24974
commit
b71a36dc1c
@@ -22,6 +22,7 @@ import (
|
||||
"github.com/fission/fission/pkg/fission-cli/cliwrapper/cli"
|
||||
"github.com/fission/fission/pkg/fission-cli/cmd"
|
||||
flagkey "github.com/fission/fission/pkg/fission-cli/flag/key"
|
||||
"github.com/fission/fission/pkg/fission-cli/util"
|
||||
)
|
||||
|
||||
type ShowSubCommand struct {
|
||||
@@ -44,12 +45,9 @@ func (opts *ShowSubCommand) run(flaginput cli.Input) error {
|
||||
return errors.New("need a cron spec like '0 30 * * * *', '@every 1h30m', or '@hourly'; use --cron")
|
||||
}
|
||||
|
||||
t, err := getAPITimeInfo(opts.Client())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
t := util.GetServerInfo(flaginput, opts.Client()).ServerTime.CurrentTime.UTC()
|
||||
|
||||
err = getCronNextNActivationTime(cronSpec, t, round)
|
||||
err := getCronNextNActivationTime(cronSpec, t, round)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "error passing cron spec examination")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user