diff --git a/cmd/troubleshoot/cli/analyze.go b/cmd/troubleshoot/cli/analyze.go index 5985546ca..7a32a2429 100644 --- a/cmd/troubleshoot/cli/analyze.go +++ b/cmd/troubleshoot/cli/analyze.go @@ -5,12 +5,12 @@ import ( "encoding/json" "fmt" - "gopkg.in/yaml.v2" analyzer "github.com/replicatedhq/troubleshoot/pkg/analyze" "github.com/replicatedhq/troubleshoot/pkg/convert" "github.com/replicatedhq/troubleshoot/pkg/logger" "github.com/spf13/cobra" "github.com/spf13/viper" + "gopkg.in/yaml.v2" ) func Analyze() *cobra.Command { @@ -61,10 +61,11 @@ func Analyze() *cobra.Command { } cmd.Flags().String("url", "", "URL of the support bundle to analyze") + cmd.MarkFlagRequired("url") cmd.Flags().String("output", "", "output format: json, yaml") cmd.Flags().String("compatibility", "", "output compatibility mode: support-bundle") + cmd.Flags().MarkHidden("compatibility") cmd.Flags().Bool("quiet", false, "enable/disable error messaging and only show parseable output") - cmd.MarkFlagRequired("url") viper.BindPFlags(cmd.Flags()) diff --git a/cmd/troubleshoot/cli/version.go b/cmd/troubleshoot/cli/version.go index 88836a26b..b9396f6f4 100644 --- a/cmd/troubleshoot/cli/version.go +++ b/cmd/troubleshoot/cli/version.go @@ -11,7 +11,6 @@ func writeVersionFile(path string) (string, error) { version := troubleshootv1beta1.SupportBundleVersion{ ApiVersion: "troubleshoot.replicated.com/v1beta1", Kind: "SupportBundle", - LayoutVersion: "0.0.1", } b, err := yaml.Marshal(version) if err != nil { diff --git a/pkg/analyze/download.go b/pkg/analyze/download.go index 8a5362193..031c9935f 100644 --- a/pkg/analyze/download.go +++ b/pkg/analyze/download.go @@ -121,7 +121,7 @@ func extractTroubleshootBundle(reader io.Reader, destDir string) error { } func getTroubleshootAnalyzers() ([]*troubleshootv1beta1.Analyze, error) { - specURL := `https://gist.githubusercontent.com/divolgin/92b512ad4697c7255f383a7c1b56fd83/raw/troubleshoot_v1beta1_preflight.yaml` + specURL := `https://gist.githubusercontent.com/divolgin/92b512ad4697c7255f383a7c1b56fd83/raw` resp, err := http.Get(specURL) if err != nil { return nil, err diff --git a/pkg/apis/troubleshoot/v1beta1/version.go b/pkg/apis/troubleshoot/v1beta1/version.go index 7331f0b0f..20eab80b3 100644 --- a/pkg/apis/troubleshoot/v1beta1/version.go +++ b/pkg/apis/troubleshoot/v1beta1/version.go @@ -3,5 +3,4 @@ package v1beta1 type SupportBundleVersion struct { ApiVersion string `json:"apiVersion" yaml:"apiVersion"` Kind string `json:"kind" yaml:"kind"` - LayoutVersion string `json:"layoutVersion" yaml:"layoutVersion"` }