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

kn source list-types - List all available source types #511

Closed
navidshaikh opened this issue Nov 20, 2019 · 7 comments
Closed

kn source list-types - List all available source types #511

navidshaikh opened this issue Nov 20, 2019 · 7 comments
Assignees
Labels
comp/source kind/feature New feature or request
Milestone

Comments

@navidshaikh
Copy link
Collaborator

navidshaikh commented Nov 20, 2019

This command list the source type CRDs, as discussed in the MVP doc.

It's all about to list all possible source types which can be used with a "kn source create"

General description from the eventing spec documentation (might become outdated, the spec is the authorative specification):

# List all available builtin, plugin and generic sources which can be 
# used with the connected cluster
$ kn source list-types

TYPE              NAME                                         DESCRIPTION
kafka             kafkasources.sources.eventing.knative.dev    Kafka messages
apiserver         apiserversources.sources.eventing.knative.de Import Kubernetes event
cronjob           cronjobsources.sources.eventing.knative.dev  Periodic event from cron
twitter           twitter.mycompany.com                        Import tweets          
storage           storages.events.cloud.run
pullsubscriptions pullsubscriptions.pubsub.cloud.run

In this example output, typed and generic sources are listed together. For generic sources a short type name calculated from the full CRD name as described in Guessable CRD names is shown. Optionally an additional column should be presented in verbose output to indicate the kind of source support (builtin/plugin/generic).
This is just a sample output, the details would have to be determined during implementation. For generic sources it should be checked whether a description could be extracted from the CRD directly so that it could be presented in the Description column.
The list above is created by performing the following steps:

  • A set of all CRDs with a label indicating that this CRD is a Knative Eventing Source is obtained from the cluster.
  • For all built in-types like cronjob, apiserver and container it is checked whether their associated CRD names are in this initial set. If so, the names removed are from the set, and the found type is printed out with a fixed description.
  • All kn plugins that start with a name kn-source- are called with “kn-source- manifest” ( could be e.g. “twitter” like in the example above). This command is supposed to return metadata as a JSON structure including the description and the supported full CRD name. It is checked if this CRD name is in the set of CRDs obtained from the cluster, and if so, it is printed out and the CRD name removed from that CRD set.
  • For all CRDs remaining in this CRD set, the CRD name is printed out with a short name for the CRD. Before printing out that name it could be checked whether the CRD is really suitable to be used as generic Source by verifying that it conforms to the Eventing Source specification.
@navidshaikh
Copy link
Collaborator Author

Separated the list-type in this issue from #497

@navidshaikh navidshaikh added this to the v0.11.0 milestone Nov 20, 2019
@navidshaikh
Copy link
Collaborator Author

/assign

@rhuss rhuss changed the title kn source list-type kn source list-type - List all available source types which can be used with "kn source create" Nov 27, 2019
@rhuss rhuss changed the title kn source list-type - List all available source types which can be used with "kn source create" kn source list-type - List all available source types Nov 27, 2019
@navidshaikh navidshaikh changed the title kn source list-type - List all available source types kn source list-types - List all available source types Dec 6, 2019
@rhuss
Copy link
Contributor

rhuss commented Dec 17, 2019

@navidshaikh Is this task done or is there still something needed ? (like plugin support)

@navidshaikh
Copy link
Collaborator Author

navidshaikh commented Dec 17, 2019

@rhuss : Plugin support remaining, also there was a mention about listing whether the source type is builtin or otherwise. So we can add a check list or fork new issues.

@rhuss
Copy link
Contributor

rhuss commented Dec 17, 2019

I would create a new issue, so that I can move that to the "Done" column in https://github.com/knative/client/projects/1 ;-)

@navidshaikh
Copy link
Collaborator Author

Created #633 for remaining items.

/close

@knative-prow-robot
Copy link
Contributor

@navidshaikh: Closing this issue.

In response to this:

Created #633 for remaining items.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@navidshaikh navidshaikh modified the milestones: v0.12.0, v0.11.0 Feb 4, 2020
coryrc pushed a commit to coryrc/client that referenced this issue May 14, 2020
…tive#511)

* Add a screenshot of the GitHub branch check setting for clarity.

* Markdown linting.
dsimansk added a commit to dsimansk/client that referenced this issue Nov 6, 2020
dsimansk pushed a commit to dsimansk/client that referenced this issue Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp/source kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants