mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-03 08:38:52 +00:00
Add support for getting resources by name
- add singular alias to get commands - allow filtering the get commands result by resource name - add the image commands to mkdocs index Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
493ee3c956
commit
a5fa731545
14 changed files with 71 additions and 34 deletions
|
|
@ -90,6 +90,11 @@ func (get getCommand) run(cmd *cobra.Command, args []string) error {
|
|||
if !getArgs.allNamespaces {
|
||||
listOpts = append(listOpts, client.InNamespace(rootArgs.namespace))
|
||||
}
|
||||
|
||||
if len(args) > 0 {
|
||||
listOpts = append(listOpts, client.MatchingFields{"metadata.name": args[0]})
|
||||
}
|
||||
|
||||
err = kubeClient.List(ctx, get.list.asClientList(), listOpts...)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue