Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kubernetes-client/gen
Common generator scripts for all client libraries
https://github.com/kubernetes-client/gen
Last synced: 3 months ago
JSON representation
Common generator scripts for all client libraries
- Host: GitHub
- URL: https://github.com/kubernetes-client/gen
- Owner: kubernetes-client
- License: apache-2.0
- Created: 2017-03-23T20:27:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-24T16:55:11.000Z (6 months ago)
- Last Synced: 2024-06-11T02:04:25.703Z (5 months ago)
- Language: Shell
- Size: 226 KB
- Stars: 150
- Watchers: 12
- Forks: 147
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: code-of-conduct.md
- Security: SECURITY_CONTACTS
Awesome Lists containing this project
README
# gen
Common generator scripts for all client libraries# Badges
[![Client Support Level](https://img.shields.io/badge/Kubernetes%20client-Bronze-blue.svg?style=plastic&colorB=cd7f32&colorA=306CE8)](https://github.com/kubernetes-client)
[![Client Support Level](https://img.shields.io/badge/Kubernetes%20client-Silver-blue.svg?style=plastic&colorB=C0C0C0&colorA=306CE8)](https://github.com/kubernetes-client)
[![Client Support Level](https://img.shields.io/badge/Kubernetes%20client-Gold-blue.svg?style=plastic&colorB=FFD700&colorA=306CE8)](https://github.com/kubernetes-client)
# Generating a client
To generate a client, first make sure the client generator exists. For any language other than
go, check `openapi/` folder for a script with `${CLIENT_LANGUAGE}.sh` and run this command:```bash
${CLIENT_LANGUAGE}.sh OUTPUT_DIR SETTING_FILE
````SETTING_FILE` is a bash script exporting required setting to generate a client. These
are normally:- `KUBERNETES_BRANCH`: The kubernetes branch to get OpenAPI spec from. e.g. "master"
- `CLIENT_VERSION`: Client version string. e.g. "1.0.0b1"
- `PACKAGE_NAME`: Package name for the generated client. e.g. "kubernetes"Example settings file for python-client:
export KUBERNETES_BRANCH="master"
export CLIENT_VERSION="8.0.0b1"
export PACKAGE_NAME="client"Note: For generating the client for any language, the PACKAGE_NAME should be "client".
You can use the latest version for the CLIENT_VERSION. It's displayed here for
the python-client ( https://github.com/kubernetes-client/python ), and similarly
for other language clients.Recommended structure is to generate client in a folder called `kubernetes` at the root of
the client repo and put all settings in a file named `settings` at the root of the repo.
If you followed these recommendations, you can simply run autoupdate script anywhere inside
the client repo:```bash
cd ${CLIENT_ROOT}/...
${GEN_REPO_ROOT}/openapi/autoupdate.sh
```## Contributing
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute.