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

Crossplane trace - (optionally) print composition resource name for composed resources #5188

Closed
Tracked by #4946
turkenh opened this issue Jan 2, 2024 · 3 comments · Fixed by #5347
Closed
Tracked by #4946
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@turkenh
Copy link
Member

turkenh commented Jan 2, 2024

What problem are you facing?

With the beta trace command, we print the NAME, SYNCED, READY and STATUS columns where name is in the format of <KIND>/<METADATA.NAME>. This is usually helpful when there are not more than a single KIND in a given composition and XR has a descriptive name. However, it lacks of enough context when there are more than one of a KIND. As an example, I have the following trace output where a couple of Helm Releases and Kubernetes Objects are composed.

NAME                                                        SYNCED   READY   STATUS
XTopLevelComposite/626bea51-e6f9-427f-b13c-a039c91840ec     True     True    Available
├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-bxkd8        True     True    Available
├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-qf5ph        True     True    Available
├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-gmk5w        True     True    Available
├─ XNestedComposite/626bea51-e6f9-427f-b13c-a039c91840ec    True     True    Available
│  ├─ Release/626bea51-e6f9-427f-b13c-a039c91840ec-5snr9    True     True    Available
│  ├─ Release/626bea51-e6f9-427f-b13c-a039c91840ec-kcfk8    True     True    Available
│  ├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-4v68g     True     True    Available
│  ├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-5l2j8     True     True    Available
│  ├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-bbclp     True     True    Available
│  ├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-k4r42     True     True    Available
│  ├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-lqmpg     True     True    Available
│  ├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-nbdgz     True     True    Available
│  ├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-tbccn     True     True    Available
│  ├─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-tg7t7     True     True    Available
│  └─ Object/626bea51-e6f9-427f-b13c-a039c91840ec-wv7pq     True     True    Available

How could Crossplane help solve your problem?

Every composed resource in a composition has a unique name which identifies the resources within the composition. It would be super helpful if we could include this information somehow. It could be added as an additional column (preferably printed with -o wide) or added in parenthesis next to each composed resource name.

@turkenh turkenh added the enhancement New feature or request label Jan 2, 2024
@turkenh turkenh changed the title Crossplane Trace - (Optionally) print composition resource name for composed resources Crossplane trace - (optionally) print composition resource name for composed resources Jan 2, 2024
@bobh66
Copy link
Contributor

bobh66 commented Jan 2, 2024

This would be a good first step for the Slack discussion - https://crossplane.slack.com/archives/C05U1LLM3B2/p1701964369745419

Displaying the actual Object name and either the Release name or the Helm chart name would make the trace a lot more useful.

There are concerns that the trace should be provider-agnostic, which I agree with, but I also think that Object and Release are two special cases that deserve additional handling for usability reasons.

Maybe it would be useful to define some standard status fields that could be automatically propagated to trace output columns so that the providers could expose specific information to the trace command?

@gtfortytwo
Copy link

It would be helpful to note in the docs for "wide" that it surfaces the comp resource name - right now it only mentions that it won't truncate Ready or Status messages. I was about to submit an RFE and found this issue or wouldn't have known the feature was already there.

@jbw976
Copy link
Member

jbw976 commented Apr 30, 2024

Good feedback @gtfortytwo! @phisco went ahead and updated the CLI help output with #5642, and @tr0njavolta opened crossplane/docs#763 to track your suggestion in docs.crossplane.io 🙇‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants