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

Add descriptions to kubectl explain #8190

Open
kevin-hanselman opened this issue Mar 18, 2022 · 5 comments
Open

Add descriptions to kubectl explain #8190

kevin-hanselman opened this issue Mar 18, 2022 · 5 comments
Labels
area/cli The `argo` CLI area/spec Changes to the workflow specification. type/feature Feature request

Comments

@kevin-hanselman
Copy link

Summary

kubectl explain is an invaluable tool for quickly exploring Kubernetes resources. CRDs can provide descriptions that kubectl explain can pick up. For example, see Knative.

Use Cases

Instead of going to the Argo Workflows webpage, I'd like to run, for example, kubectl explain workflow for guidance on building a Workflow resource.


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

@kevin-hanselman kevin-hanselman added the type/feature Feature request label Mar 18, 2022
@alexec
Copy link
Contributor

alexec commented Mar 18, 2022

This is like man for CRDs?

@alexec alexec added the area/cli The `argo` CLI label Mar 18, 2022
@kevin-hanselman
Copy link
Author

This is like man for CRDs?

@alexec it's like man for all Kubernetes resources -- built-ins and CRDs alike.

@danielhelfand
Copy link
Contributor

danielhelfand commented Apr 19, 2022

This may be a bit challenging for resources like Workflows, which will require a schema for this feature to work. Due to the size of the CRDs with the schema, this will cause errors like below when deploying the CRD with descriptions:

for: "manifests/base/crds/full/argoproj.io_workflows.yaml": Request entity too large: limit is 3145728

It seems schemas were intentionally left out due to this issue.

However, it still may be possible for smaller CRDs to support kubectl explain.

@drew-viles
Copy link

Even if a description can't be put in, it would be nice to know what lies under spec.

For example, if something is a map[string]string or a bool etc. Having nothing isn't really useful for development as it means people need to know the fields they want already before they go to the docs for an example of it rather than being able to deduce how to lay something out from the explain command

An example of this would be when I was creating a CronWorkflow. I presumed base on the example here that the .spec.workflowSpec.templates.dag.tasks.template.name would be the name of a WorkflowTemplate, however this isn't really clear. I only know by hunting through examples in the GitHub repo that you would have to use spec.workflowSpec.workflowTemplateName.name to reference a workflow template.

I feel there is room for improvement here and if I can find the time to help with this I will. Either getting the explain command to work on a more descriptive level or improving any docs where possible.

@drew-viles
Copy link

I've located this - it's something for now I guess.
https://argoproj.github.io/argo-workflows/fields/#workflow

Just not ideal when working on a cli 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli The `argo` CLI area/spec Changes to the workflow specification. type/feature Feature request
Projects
None yet
Development

No branches or pull requests

5 participants