Skip to content

feat(output): table output to minimize resource list verbosity #111

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

manusa
Copy link
Owner

@manusa manusa commented Jun 12, 2025

Part of #75

A new configuration options is available: --list-output

There are two modes available:

  • yaml: current default (will be changed in subsequent PR), which returns a multi-document YAML
  • table: returns a plain-text table as created by the kube-api server when requested with Accept: application/json;as=Table;v=v1;g=meta.k8s.io

Additional logic has been added to the table format to include the apiVersion and kind. This is not returned by the server, kubectl doesn't include this either. However, this is extremely handy for the LLM when using the generic resource tools.

A new configuration options is available: `--list-output`

There are two modes available:
 - `yaml`: current default (will be changed in subsequent PR), which returns a multi-document YAML
 - `table`: returns a plain-text table as created by the kube-api server when requested with
   `Accept: application/json;as=Table;v=v1;g=meta.k8s.io`

Additional logic has been added to the table format to include the apiVersion and kind.
This is not returned by the server, kubectl doesn't include this either.
However, this is extremely handy for the LLM when using the generic resource tools.
@manusa manusa force-pushed the feat/table-printer branch from 75dba26 to dcb4cf0 Compare June 12, 2025 11:18
@manusa manusa added this to the 0.1.0 milestone Jun 12, 2025 — with automated-tasks
@manusa manusa merged commit 7e10e82 into main Jun 12, 2025
5 checks passed
@manusa manusa deleted the feat/table-printer branch June 12, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant