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

Provide same info when adding -o json or -o yaml flag to workload get command #23

Open
heyjcollins opened this issue Mar 17, 2022 · 1 comment
Labels

Comments

@heyjcollins
Copy link
Contributor

Description of problem

When it exists, the URL to the running workload is included in tanzu apps workload get.... output.
However, the URL isn't included in the output if the user runs that command with -o json/yaml.

Proposed solution

show the url that is included in the workload get command i.e. the last line in the output

Given workload A has been created, and a knative service has been successfully created
When I run `tanzu apps workload get A -o json (or yaml)`
Then I can see the URL in the output

Example

# tanzu-java-web-app: Ready
---
lastTransitionTime: "2022-02-12T04:45:10Z"
message: ""
reason: Ready
status: "True"
type: Ready

Workload pods
NAME                                                   STATUS      RESTARTS   AGE
tanzu-java-web-app-00002-deployment-7465d4848f-8s5k5   Running     0          5d22h
tanzu-java-web-app-build-1-build-pod                   Succeeded   0          6d2h
tanzu-java-web-app-config-writer-n5csw-pod             Succeeded   0          6d2h
tanzu-java-web-app-config-writer-s8d2j-pod             Succeeded   0          5d22h

Workload Knative Services
NAME                 READY   URL
tanzu-java-web-app   Ready   http://tanzu-java-web-app.default.usability-testing.tlc.dev/

But this URL and the pods is not visible when using -o json or -o yaml which is the way we normally consume this command

Alternatives considered

The alternative would be for us to use the k8s API to fetch that information manually, but I think that if this info is already fetched and aggregated by the CLI it would be great if we could use it

Additional context

Ideally we would like to provide users with an agnostic reachable url, independent of knative if that's how their cluster is setup

originally reported by @suarezjulian

@heyjcollins heyjcollins added enhancement New feature or request needs-triage labels Mar 17, 2022
@heyjcollins heyjcollins added this to the 0.6.0 milestone Mar 17, 2022
@atmandhol atmandhol modified the milestones: 0.6.0, 0.7.0 Mar 31, 2022
@atmandhol atmandhol removed this from the 0.7.0 milestone Apr 18, 2022
@heyjcollins
Copy link
Contributor Author

Not migrated because this will not be addressed by carto v1 and with v2 which supports an infinite number of workload types and it's not clear we'll be able to reliably retrieve a URL if/when it exists.
If we learn this isn't the case for carto v2, we can move this over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants