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

Ability to query docs.crds programmatically #59

Closed
eladb opened this issue May 24, 2020 · 3 comments
Closed

Ability to query docs.crds programmatically #59

eladb opened this issue May 24, 2020 · 3 comments

Comments

@eladb
Copy link

eladb commented May 24, 2020

It would be awesome to be able to query docs.crds programmatically (through a simple HTTP API).

My use case is to be able to add support in cdk8s to import CRDs that are listed in docs.crds. For example, say I want to import all of crossplane's CRDs into my cdk8s app :-).

@hasheddan
Copy link
Member

@eladb I love this feature! A few thoughts:

  • Adding an endpoint that returns a list of all CRDs for a project should be relatively straight-forward 👍
  • Allowing a user to download a CRD for a project could be pretty easy as we could just proxy the raw github content

One thing that would make this experience potentially less than ideal is that the filepath in the repo in currently used as the unique identifier for a CRD. The reason for this is that a CRD may be present in multiple locations in a repo (you can see this on https://doc.crds.dev/github.com/crossplane/crossplane for example) and we are not able to say for sure which is the "true" CRD representation. Therefore, if you wanted to download all crossplane/crossplane CRDs we would likely return some duplicates. If they are the same, this should be okay because if you are kubectl apply -f for example then you would just get something like unchanged.

One thing I have been thinking about is allowing projects to put some sort of doc.crds file in their repo that has config that we will honor if present. This would allow projects who opt-in to have a better experience for users, and for those who do not, they would just get a best-effort. Do you have any thoughts on these points?

@hasheddan
Copy link
Member

This has been addressed in #93

@eladb
Copy link
Author

eladb commented Nov 22, 2020

🚀

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

No branches or pull requests

2 participants