diff --git a/cmd/internal/util/dump_spec.go b/cmd/internal/util/dump_spec.go index 85c1a108e..64a0ab69a 100644 --- a/cmd/internal/util/dump_spec.go +++ b/cmd/internal/util/dump_spec.go @@ -7,10 +7,11 @@ import ( "github.com/pkg/errors" "github.com/replicatedhq/troubleshoot/internal/specs" "github.com/replicatedhq/troubleshoot/pkg/k8sutil" + "github.com/replicatedhq/troubleshoot/pkg/logger" "github.com/spf13/cobra" "github.com/spf13/viper" - "gopkg.in/yaml.v2" "k8s.io/client-go/kubernetes" + "sigs.k8s.io/yaml" ) func DumpSpecCmd() *cobra.Command { @@ -22,6 +23,15 @@ func DumpSpecCmd() *cobra.Command { return printSpecs(args) }, } + + cmd.Flags().StringSliceP("selector", "l", []string{"troubleshoot.sh/kind=support-bundle"}, "selector to filter on for loading additional support bundle specs found in secrets within the cluster") + cmd.Flags().Bool("load-cluster-specs", false, "enable/disable loading additional troubleshoot specs found within the cluster. required when no specs are provided on the command line") + + // Initialize klog flags + logger.InitKlogFlags(cmd) + + k8sutil.AddFlags(cmd.Flags()) + return cmd }