cmd.Flags().StringP("selector","l","","Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmdutil.AddIncludeUninitializedFlag(cmd)
cmd.Flags().BoolP("watch","w",false,"After listing/getting the requested object, watch for changes. Uninitialized objects are excluded if no object name is provided.")
cmd.Flags().Bool("watch-only",false,"Watch for changes to the requested object(s), without listing/getting first.")
cmd.Flags().Bool("show-kind",false,"If present, list the resource type for the requested object(s).")
cmd.Flags().Bool("all-namespaces",false,"If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.")
cmd.Flags().BoolVar(&options.IgnoreNotFound,"ignore-not-found",false,"Treat \"resource not found\" as a successful retrieval.")
cmd.Flags().StringVar(&options.Raw,"raw",options.Raw,"Raw URI to request from the server. Uses the transport specified by the kubeconfig file.")
cmd.Flags().BoolVarP(&options.Watch,"watch","w",options.Watch,"After listing/getting the requested object, watch for changes. Uninitialized objects are excluded if no object name is provided.")
cmd.Flags().BoolVar(&options.WatchOnly,"watch-only",options.WatchOnly,"Watch for changes to the requested object(s), without listing/getting first.")
cmd.Flags().Int64Var(&options.ChunkSize,"chunk-size",500,"Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.")
cmd.Flags().StringSliceP("label-columns","L",[]string{},"Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag options like -L label1 -L label2...")
cmd.Flags().Bool("export",false,"If true, use 'export' for the resources. Exported resources are stripped of cluster-specific information.")
cmd.Flags().BoolVar(&options.IgnoreNotFound,"ignore-not-found",options.IgnoreNotFound,"If the requested object does not exist the command will return exit code 0.")
cmd.Flags().StringVarP(&options.LabelSelector,"selector","l",options.LabelSelector,"Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
cmd.Flags().BoolVar(&options.AllNamespaces,"all-namespaces",options.AllNamespaces,"If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.")
cmdutil.AddIncludeUninitializedFlag(cmd)
cmdutil.AddPrinterFlags(cmd)
addOpenAPIPrintColumnFlags(cmd)
usage:="identifying the resource to get from a server."
cmd.Flags().BoolVar(&options.ShowKind,"show-kind",options.ShowKind,"If present, list the resource type for the requested object(s).")
cmd.Flags().StringSliceVarP(&options.LabelColumns,"label-columns","L",options.LabelColumns,"Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag options like -L label1 -L label2...")
cmd.Flags().BoolVar(&options.Export,"export",options.Export,"If true, use 'export' for the resources. Exported resources are stripped of cluster-specific information.")
cmdutil.AddFilenameOptionFlags(cmd,&options.FilenameOptions,"identifying the resource to get from a server.")
cmdutil.AddInclude3rdPartyFlags(cmd)
cmd.Flags().StringVar(&options.Raw,"raw",options.Raw,"Raw URI to request from the server. Uses the transport specified by the kubeconfig file.")
returncmd
}
// RunGet implements the generic Get command
// TODO: convert all direct flag accessors to a struct and pass that instead of cmd
usageString=fmt.Sprintf("%s\nUse \"%s explain <resource>\" for a detailed description of that resource (e.g. %[2]s explain pods).",usageString,fullCmdName)
usageString=fmt.Sprintf("%s\nUse \"%s explain <resource>\" for a detailed description of that resource (e.g. %[2]s explain pods).",usageString,fullCmdName)
cmd.Flags().Bool(useOpenAPIPrintColumnFlagLabel,false,"If true, use x-kubernetes-print-column metadata (if present) from openapi schema for displaying a resource.")
cmd.Flags().Bool(useOpenAPIPrintColumnFlagLabel,false,"If true, use x-kubernetes-print-column metadata (if present) from the OpenAPI schema for displaying a resource.")
// marking it deprecated so that it is hidden from usage/help text.
cmd.Flags().MarkDeprecated(useOpenAPIPrintColumnFlagLabel,"It's an experimental feature.")
cmd.Flags().MarkDeprecated(useOpenAPIPrintColumnFlagLabel,"This flag is experimental and may be removed in the future.")