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

Major Refactor of the library #71

Closed
lholmquist opened this issue May 25, 2018 · 3 comments
Closed

Major Refactor of the library #71

lholmquist opened this issue May 25, 2018 · 3 comments
Assignees

Comments

@lholmquist
Copy link
Member

Currently the library duplicates a lot of code between GET, POST, etc.... methods

I think most, if not all, pretty much do the same thing with only the url that it "requests" being different.

This can probably be refactored a lot.

The other part is the lib directory could be split between the various supported APIs.

For example:

.
└── lib
    ├── kube
    ├── oapi
    └── v1beta1

Even though the API should work the same, we should make this a major version update

@lholmquist
Copy link
Member Author

I believe that there is an endpoint you can query on Openshift/Kubernetes that will give you all the endpoints. This could be used to then create the client

@lholmquist
Copy link
Member Author

Taking a look at this library, https://github.com/godaddy/kubernetes-client, which looks to be pretty active, they are using a module called, swagger-fluent to create the api's at runtime.

it can either query the cluster to get the endpoints(currently just does /openapi/v2, which is kube only), or can take in a swagger.json file.

I did a little experiment, where i pointed it(kubernetes-client module) at a local copy of an Openshift swagger, i believe this includes both openshift and kube apis, and things seemed to work fine.

I've asked a question on the openshift/origin repo, openshift/origin#22122, to see if this document is exposed anywhere.

experimentation continues

@lholmquist
Copy link
Member Author

I've created an issue regarding custom alias, godaddy/kubernetes-client#418

So if we do end up wrapping that library, we can add the openshift-y aliases in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants