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
+4 -4
View File
@@ -32,7 +32,7 @@ func Commands() *cobra.Command {
}
wrapper.SetFlags(uploadCmd, flag.FlagSet{
Required: []flag.Flag{flag.ArchiveName},
Optional: []flag.Flag{flag.KubeContext},
Optional: []flag.Flag{},
})
listCmd := &cobra.Command{
@@ -41,7 +41,7 @@ func Commands() *cobra.Command {
RunE: wrapper.Wrapper(List),
}
wrapper.SetFlags(listCmd, flag.FlagSet{
Optional: []flag.Flag{flag.KubeContext},
Optional: []flag.Flag{},
})
deleteCmd := &cobra.Command{
@@ -61,7 +61,7 @@ func Commands() *cobra.Command {
}
wrapper.SetFlags(geturlCmd, flag.FlagSet{
Required: []flag.Flag{flag.ArchiveID},
Optional: []flag.Flag{flag.KubeContext},
Optional: []flag.Flag{},
})
downloadCmd := &cobra.Command{
@@ -71,7 +71,7 @@ func Commands() *cobra.Command {
}
wrapper.SetFlags(downloadCmd, flag.FlagSet{
Required: []flag.Flag{flag.ArchiveID},
Optional: []flag.Flag{flag.KubeContext, flag.ArchiveOutput},
Optional: []flag.Flag{flag.ArchiveOutput},
})
command := &cobra.Command{