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:
neha_gupta
2022-11-07 21:42:39 +05:30
committed by GitHub
co-authored by Sanket Sudake
parent 261bf24974
commit b71a36dc1c
86 changed files with 1115 additions and 978 deletions
+2 -7
View File
@@ -30,8 +30,6 @@ func Check(input cli.Input) error {
func (opts *CheckSubCommand) do(input cli.Input) error {
kubeContext := input.String(flagkey.KubeContext)
checks := []healthcheck.CategoryID{}
if input.IsSet(flagkey.PreCheckOnly) {
@@ -40,11 +38,8 @@ func (opts *CheckSubCommand) do(input cli.Input) error {
checks = append(checks, healthcheck.FissionServices, healthcheck.FissionVersion)
}
hc := healthcheck.NewHealthChecker(checks, &healthcheck.Options{
KubeContext: kubeContext,
FissionClient: opts.Client(),
})
hc := healthcheck.NewHealthChecker(opts.Client(), checks)
healthcheck.RunChecks(input.Context(), hc)
healthcheck.RunChecks(input.Context(), input, opts.Client(), hc)
return nil
}