feature: Added command to list pods managed by fission for environment/function (#2207)

This commit is contained in:
Pradeep Lakshmi Narasimha
2021-10-10 10:52:42 +05:30
committed by GitHub
parent e930a2922c
commit c9da527d37
16 changed files with 403 additions and 32 deletions
+13 -1
View File
@@ -201,13 +201,25 @@ func Commands() *cobra.Command {
},
})
listPodsCmd := &cobra.Command{
Use: "pods",
Aliases: []string{"pod", "po"},
Short: "List pods currently used by a function",
Long: "List pods currently used by a function",
RunE: wrapper.Wrapper(ListPods),
}
wrapper.SetFlags(listPodsCmd, flag.FlagSet{
Required: []flag.Flag{flag.FnName},
Optional: []flag.Flag{flag.NamespaceFunction},
})
command := &cobra.Command{
Use: "function",
Aliases: []string{"fn"},
Short: "Create, update and manage functions",
}
command.AddCommand(createCmd, getCmd, getmetaCmd, updateCmd, deleteCmd, listCmd, logsCmd, testCmd,
runContainerCmd, updateContainerCmd)
runContainerCmd, updateContainerCmd, listPodsCmd)
return command
}