mirror of https://github.com/linkerd/linkerd2.git
Introduce -A as a shorthand for --all-namespaces (#3125)
kubectl introduced `-A` as a shorthand for `--all-namespaces` in `v1.14.0`: https://github.com/kubernetes/kubernetes/pull/72006 Update linkerd cli's `edges`, `get`, and `stat` commands to match this convention. Signed-off-by: Andrew Seigner <siggy@buoyant.io>
This commit is contained in:
parent
64ed8e4a74
commit
889a4a0578
|
|
@ -65,7 +65,7 @@ func newCmdEdges() *cobra.Command {
|
|||
|
||||
# Get all edges between pods that either originate from or terminate in the default namespace.
|
||||
linkerd edges po
|
||||
|
||||
|
||||
# Get all edges between pods in all namespaces.
|
||||
linkerd edges po --all-namespaces`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
|
|
@ -109,7 +109,7 @@ func newCmdEdges() *cobra.Command {
|
|||
|
||||
cmd.PersistentFlags().StringVarP(&options.namespace, "namespace", "n", options.namespace, "Namespace of the specified resource")
|
||||
cmd.PersistentFlags().StringVarP(&options.outputFormat, "output", "o", options.outputFormat, "Output format; one of: \"table\" or \"json\" or \"wide\"")
|
||||
cmd.PersistentFlags().BoolVar(&options.allNamespaces, "all-namespaces", options.allNamespaces, "If present, returns edges across all namespaces, ignoring the \"--namespace\" flag")
|
||||
cmd.PersistentFlags().BoolVarP(&options.allNamespaces, "all-namespaces", "A", options.allNamespaces, "If present, returns edges across all namespaces, ignoring the \"--namespace\" flag")
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ Only pod resources (aka pods, po) are supported.`,
|
|||
}
|
||||
|
||||
cmd.PersistentFlags().StringVarP(&options.namespace, "namespace", "n", options.namespace, "Namespace of pods")
|
||||
cmd.PersistentFlags().BoolVar(&options.allNamespaces, "all-namespaces", options.allNamespaces, "If present, returns pods across all namespaces, ignoring the \"--namespace\" flag")
|
||||
cmd.PersistentFlags().BoolVarP(&options.allNamespaces, "all-namespaces", "A", options.allNamespaces, "If present, returns pods across all namespaces, ignoring the \"--namespace\" flag")
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ If no resource name is specified, displays stats about all resources of the spec
|
|||
cmd.PersistentFlags().StringVar(&options.toNamespace, "to-namespace", options.toNamespace, "Sets the namespace used to lookup the \"--to\" resource; by default the current \"--namespace\" is used")
|
||||
cmd.PersistentFlags().StringVar(&options.fromResource, "from", options.fromResource, "If present, restricts outbound stats from the specified resource name")
|
||||
cmd.PersistentFlags().StringVar(&options.fromNamespace, "from-namespace", options.fromNamespace, "Sets the namespace used from lookup the \"--from\" resource; by default the current \"--namespace\" is used")
|
||||
cmd.PersistentFlags().BoolVar(&options.allNamespaces, "all-namespaces", options.allNamespaces, "If present, returns stats across all namespaces, ignoring the \"--namespace\" flag")
|
||||
cmd.PersistentFlags().BoolVarP(&options.allNamespaces, "all-namespaces", "A", options.allNamespaces, "If present, returns stats across all namespaces, ignoring the \"--namespace\" flag")
|
||||
cmd.PersistentFlags().StringVarP(&options.outputFormat, "output", "o", options.outputFormat, "Output format; one of: \"table\" or \"json\" or \"wide\"")
|
||||
|
||||
return cmd
|
||||
|
|
|
|||
Loading…
Reference in New Issue