Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1beta2 clusterctl describe and multiline conditions not printed correctly #11782

Open
tobiasgiese opened this issue Feb 1, 2025 · 3 comments · May be fixed by #11781
Open

V1beta2 clusterctl describe and multiline conditions not printed correctly #11782

tobiasgiese opened this issue Feb 1, 2025 · 3 comments · May be fixed by #11781
Assignees
Labels
area/clusterctl Issues or PRs related to clusterctl kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@tobiasgiese
Copy link
Member

tobiasgiese commented Feb 1, 2025

What steps did you take and what happened?

The multiline feature in clusterctl has a bug in the multiline conditions.
If the Ready condition message has multipile lines the multiline prefix is not calculated properly.
To fix this we can use the same logic as for the other conditions and verify if the object is the last object in the tree.

To reproduce the issue we can follow the quickstart guide and run clusterctl describe cluster capi-quickstart --v1beta2.
Note: the change is not required if the --show-conditions flag is passed as here the Ready/Available condition is moved to the conditions rows.

What did you expect to happen?

The prefixes for the conditions should have been calculated correctly.

Cluster API version

main / v1.9.4

Kubernetes version

No response

Anything else you would like to add?

Here is a screenshot (because of the colors) of clusterctl describe cluster capi-quickstart --v1beta2

Image

code block for completeness
Switched to branch 'main'
Your branch is behind 'upstream/main' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
❯ go run cmd/clusterctl/main.go describe cluster capi-quickstart --v1beta2

NAME                                                              REPLICAS  AVAILABLE  READY  UP TO DATE  STATUS            REASON        SINCE  MESSAGE
Cluster/capi-quickstart                                           0/6       0          0      0           Available: False  NotAvailable  35h    * RemoteConnectionProbe: Remote connection probe failed
?                                                                                                                                                * InfrastructureReady: DockerCluster status.ready is false
?                                                                                                                                                * ControlPlaneAvailable: Control plane not yet initialized
?                                                                                                                                                * WorkersAvailable:
?                                                                                                                                                  * MachineDeployment capi-quickstart-md-0-chmch: 0 available replicas, at least 3 required
?                                                                                                                                                    (spec.strategy.rollout.maxUnavailable is 0, spec.replicas is 3)
├─ClusterInfrastructure - DockerCluster/capi-quickstart-h9fmt
├─ControlPlane - KubeadmControlPlane/capi-quickstart-vcr9d                  0          0      0
└─Workers
  └─MachinePool/capi-quickstart-mp-0-vgq8f
    └─BootstrapConfig - KubeadmConfig/capi-quickstart-mp-0-mjx7k                                          Ready: False      NotReady      35h    * DataSecretAvailable: Waiting for Cluster status.infrastructureReady to be true
?                                                                                                                                                * CertificatesAvailable: Condition not yet reported

Label(s) to be applied

/kind bug
/area clusterctl

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 1, 2025
@tobiasgiese
Copy link
Member Author

/assign

@tobiasgiese
Copy link
Member Author

/area clusterctl

@k8s-ci-robot k8s-ci-robot added the area/clusterctl Issues or PRs related to clusterctl label Feb 1, 2025
@chrischdi
Copy link
Member

/triage accepted
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates an issue lacks a `priority/foo` label and requires one. labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clusterctl Issues or PRs related to clusterctl kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants