Skip to content

Commit

Permalink
Removing not used flag and renaming docs
Browse files Browse the repository at this point in the history
  • Loading branch information
knabben committed Jan 3, 2023
1 parent 3b4f70f commit 3dc6eef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
9 changes: 2 additions & 7 deletions cmd/clusterctl/cmd/describe_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ type describeClusterOptions struct {
showClusterResourceSets bool
showTemplates bool
echo bool
disableNoEcho bool
grouping bool
disableGrouping bool
color bool
Expand Down Expand Up @@ -94,7 +93,7 @@ var describeClusterClusterCmd = &cobra.Command{
# Describe the cluster named test-1 disabling automatic echo suppression
# e.g. show the infrastructure machine objects, no matter if the current state is already reported by the machine's Ready condition.
clusterctl describe cluster test-1 --disable-no-echo`),
clusterctl describe cluster test-1 --echo`),

Args: func(cmd *cobra.Command, args []string) error {
if len(args) != 1 {
Expand Down Expand Up @@ -126,10 +125,6 @@ func init() {

describeClusterClusterCmd.Flags().BoolVar(&dc.echo, "echo", false, ""+
"Show MachineInfrastructure and BootstrapConfig when ready condition is true or it has the Status, Severity and Reason of the machine's object.")
describeClusterClusterCmd.Flags().BoolVar(&dc.disableNoEcho, "disable-no-echo", false, ""+
"Disable hiding of a MachineInfrastructure and BootstrapConfig when ready condition is true or it has the Status, Severity and Reason of the machine's object.")
_ = describeClusterClusterCmd.Flags().MarkDeprecated("disable-no-echo",
"use --echo instead.")
describeClusterClusterCmd.Flags().BoolVar(&dc.grouping, "grouping", true,
"Groups machines when ready condition has the same Status, Severity and Reason.")
describeClusterClusterCmd.Flags().BoolVar(&dc.disableGrouping, "disable-grouping", false,
Expand Down Expand Up @@ -165,7 +160,7 @@ func runDescribeCluster(cmd *cobra.Command, name string) error {
ShowTemplates: dc.showTemplates,
ShowMachineSets: dc.showMachineSets,
AddTemplateVirtualNode: true,
Echo: dc.echo || dc.disableNoEcho,
Echo: dc.echo,
Grouping: dc.grouping && !dc.disableGrouping,
})
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions docs/book/src/clusterctl/commands/describe-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ bootstrap object linked to a machine, unless their state differs from the machin

## Customizing the visualization

By default the visualization generated by `clusterctl describe cluster` hides details for the sake
By default, the visualization generated by `clusterctl describe cluster` hides details for the sake
of simplicity and shortness. However, if required, the user can ask for showing all the detail:

By using the `--disable-grouping` flag, the user can force the visualization to show all the machines
on separated lines, no matter if they have the same state or not:

![](../../images/describe-cluster-disable-grouping.png)

By using the `--disable-no-echo` flag, the user can force the visualization to show infrastructure machines and
By using the `--echo` flag, the user can force the visualization to show infrastructure machines and
bootstrap objects linked to machines, no matter if they have the same state or not:

![](../../images/describe-cluster-disable-no-echo.png)
![](../../images/describe-cluster-no-echo.png)

It is also possible to force the visualization to show all the conditions for an object (instead of showing
only the ready condition). e.g. with `--show-conditions KubeadmControlPlane` you get:
Expand Down

0 comments on commit 3dc6eef

Please sign in to comment.