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

workload tail supports --recent and --pod #67

Open
heyjcollins opened this issue Apr 7, 2022 · 0 comments
Open

workload tail supports --recent and --pod #67

heyjcollins opened this issue Apr 7, 2022 · 0 comments
Labels
enhancement New feature or request MIGRATED-MIGRATED Migrated to private repo needs-design needs-triage

Comments

@heyjcollins
Copy link
Contributor

heyjcollins commented Apr 7, 2022

Description of problem

The apps plugin relies on stern logging library to tail the logs for all pod resources created as a result of a tanzu apps workload create/update/apply...

The log output can be quite verbose and we currently provide the ability to filter the logs by --component (e.g. values: run or build).
This is helpful, but the logs even for a single pod can be lengthy and the stern library provides some additional filtering features we may want to take advantage of and expose to end-users.

The cf-cli enabled grabbing the most recent 100 log lines via cf logs my-app --recent.
--recent was used with a high degree of frequency.
We should look into whether/how we might provide a similar feature in the apps plugin.

Additionally - the current --component flag isn't intuitively named.
We should deprecate --component and provide a new --pod flag to allow user to filter the logs to those only from the pod specified.
--pod can be specified multiple times.
If no --pod value is provided, all pod logs should be included.

Proposed solution

  1. tanzu apps workload tail my-app --recent
    • Returns the most recent 100 log lines, from ALL pods, ordered by timestamp ascending (most recent log entry would be at the end of the log output).
  2. tanzu apps workload tail my-app --recent --pod my-app-build-3-build-pod
    • Returns the most recent 100 log lines, from pod my-app-build-3-build-pod, ordered by timestamp ascending.
  3. tanzu apps workload tail my-app --recent --pod my-app-build-3-build-pod --pod my-app-config-writer-xgx4q-pod
    • Returns the most recent 100 log lines, from both my-app-build-3-build-pod and my-app-config-writer-xgx4q-pod, ordered by timestamp ascending.
  4. tanzu apps workload tail -h
    • Returns help which includes two additional flags
      • --pod string pod to tail logs from (flag can be used multiple times)
      • --recent provide the most recent 100 log lines
@heyjcollins heyjcollins added enhancement New feature or request needs-triage labels Apr 7, 2022
@heyjcollins heyjcollins changed the title Enrich tail logs command workload tail supports --recent and --pod Oct 17, 2022
@heyjcollins heyjcollins added the MIGRATED-MIGRATED Migrated to private repo label Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request MIGRATED-MIGRATED Migrated to private repo needs-design needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant