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

[Q] the proper way to add new parameter to kubernetes/client/configuration.py #1582

Closed
itaru2622 opened this issue Oct 19, 2021 · 3 comments
Closed
Labels
kind/documentation Categorizes issue or PR as related to documentation.

Comments

@itaru2622
Copy link
Contributor

Link to the issue (please include a link to the specific documentation or example):
related to #1579
Description of the issue (please include outputs or screenshots if possible):

maintainer said in #1579 :

These files(kubernetes/client/configuration.yaml) are generated by openapi-generator and will get reverted when we re-generate the client.
The proper way to fix it is to send a PR to https://github.com/OpenAPITools/openapi-generator.
A mid-term workaround is to add a patch in this repo, for example: scripts/rest_client_patch.diff

I confirmed scripts/update-client.sh reverts 'no_proxy' from kubernetes/client/configuration.py.
but I could not find openapi definition file which is used as input to openapi-generator. where is it?
script/swagger.json seems to be output file.

I believe that:

  • the data model for kubernetes/client/configuration is defined in kubernetes-client's openapi definition file (json or yaml) and new parameter should be added into it.
  • for this matter(adding new parameter in data model), there is no need to change openapi-generator itself and workaround (adding by patch) is not good way.
@itaru2622 itaru2622 added the kind/documentation Categorizes issue or PR as related to documentation. label Oct 19, 2021
@itaru2622
Copy link
Contributor Author

I could find openapi definition file at https://github.com/kubernetes/kubernetes/blob/master/api/openapi-spec/swagger.json
but could not find data model for kubernetes/client/configuration.py in the above openapi definition file.

@itaru2622 itaru2622 changed the title [Q] the proper way to adding new parameter to kubernetes/client/configuration.py [Q] the proper way to add new parameter to kubernetes/client/configuration.py Oct 19, 2021
@itaru2622
Copy link
Contributor Author

@roycaihw please let me know where is data model for kubernetes/client/configuration.py

@itaru2622
Copy link
Contributor Author

itaru2622 commented Oct 20, 2021

after investigation on openapi-generator...
@roycaihw did you mean that following files are generated by openapi-generator and kubernetes-client is just using them in AS-IS base?

  • kubernetes/client/configuration.py
  • kubernetes/client/rest.py
    except patch scripts/rest_client_patch.diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

No branches or pull requests

1 participant