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
+1 -2
View File
@@ -37,7 +37,6 @@ func Download(input cli.Input) error {
func (opts *DownloadSubCommand) do(input cli.Input) error {
kubeContext := input.String(flagkey.KubeContext)
archiveID := input.String(flagkey.ArchiveID)
archiveOutput := input.String(flagkey.ArchiveOutput)
@@ -45,7 +44,7 @@ func (opts *DownloadSubCommand) do(input cli.Input) error {
archiveOutput = strings.TrimPrefix(archiveID, "/fission/fission-functions/")
}
storageAccessURL, err := util.GetStorageURL(input.Context(), kubeContext)
storageAccessURL, err := util.GetStorageURL(input.Context(), opts.Client())
if err != nil {
return err
}