Skip to content

Commit

Permalink
feat(cli): show ConfigMaps on jx diagnose output
Browse files Browse the repository at this point in the history
Signed-off-by: ankitm123 <[email protected]>
  • Loading branch information
ankitm123 authored and jenkins-x-bot committed Feb 3, 2020
1 parent 73251ce commit 84bd200
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/cmd/diagnose.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewCmdDiagnose(commonOpts *opts.CommonOptions) *cobra.Command {
},
}
cmd.Flags().StringVarP(&options.Namespace, "namespace", "n", "", "The namespace to display the kube resources from. If left out, defaults to the current namespace")
cmd.Flags().StringArrayVarP(&options.Show, "show", "", []string{"version", "status", "pvc", "pods", "ingresses", "secrets"}, "Determine what information to diagnose")
cmd.Flags().StringArrayVarP(&options.Show, "show", "", []string{"version", "status", "pvc", "pods", "ingresses", "secrets", "configmaps"}, "Determine what information to diagnose")
return cmd
}

Expand Down Expand Up @@ -86,6 +86,13 @@ func (o *DiagnoseOptions) Run() error {
}
}

if o.showOption("configmaps") {
err := printStatus(o, "Kubernetes Configmaps", "kubectl", "get", "configmaps", "--namespace", ns)
if err != nil {
return err
}
}

if o.showOption("health") {
err = health.Kuberhealthy(kubeClient, ns)
if err != nil {
Expand Down

0 comments on commit 84bd200

Please sign in to comment.