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

missing support for custom object status/scale api #71

Closed
juliantaylor opened this issue Jul 17, 2018 · 7 comments
Closed

missing support for custom object status/scale api #71

juliantaylor opened this issue Jul 17, 2018 · 7 comments

Comments

@juliantaylor
Copy link
Contributor

juliantaylor commented Jul 17, 2018

since kubernetes 1.11 the custom object status/scale api is in beta:
https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#status-subresource

But the generator does not support it as it is missing in openapi/custom_objects_spec.json
If this is not intentional due to the beta status of the api it would be very helpful to have this added so clients can generate code for it.

@juliantaylor juliantaylor changed the title missing support for custom object status api missing support for custom object status/scale api Jul 17, 2018
@brendandburns
Copy link
Contributor

This isnt intentional. We should fix, would love a pr...

@juliantaylor
Copy link
Contributor Author

I'd love to but I can't find any documentation how this file is generated.

@juliantaylor
Copy link
Contributor Author

@mbohlool as you added the file originally, can you provide some guidance on how to best update it?

@brendandburns
Copy link
Contributor

You just need to edit that JSON Swagger file to have the new object, then everything "just works" when you regenerate...

See the code here:

CUSTOM_OBJECTS_SPEC_PATH = os.path.join(

def add_custom_objects_spec(spec):

@juliantaylor
Copy link
Contributor Author

yeah sure, but do you manually write that swagger file? It looks generated.

juliantaylor added a commit to juliantaylor/gen that referenced this issue Jul 29, 2018
juliantaylor added a commit to juliantaylor/gen that referenced this issue Jul 29, 2018
@mbohlool
Copy link
Contributor

mbohlool commented Aug 1, 2018

This is the file: https://github.com/kubernetes-client/gen/blob/master/openapi/custom_objects_spec.json

It is not auto-generated. The code Brendan referenced is where this spec get merged with the main spec (that one is generated). You can edit that file and add /scale and /status endpoints.

@juliantaylor
Copy link
Contributor Author

yes thanks, I have already created a PR with the additions

brendandburns pushed a commit that referenced this issue Aug 1, 2018
* improve error message on failed spec download

* add scale and status api of custom objects

Closes gh-71
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

3 participants