
Kubernetes Release 1.0 was announced at OSCON A new Fedora Atomic image has been built with version 1.0.4 and this series of patches will update the templates, scripts, documents to work with the new image. The api has also been changed from v1beta3 to v1 and the beta api is no longer available, so the interface between Magnum and Kubernetes master are updated as well in this series of patches. This particular patch will bring up a V1 cluster with the bay-create command. Because the switch to the V1 API requires all the code changes to be applied at once, this patch pulls in portion of 3 patches together. The changes include: 1. devstack plugin downloads the new image. 2. k8s conductor and other code calls the new V1 client and k8s methods. 3. Configuration for k8s services and docker updated with new parameters. 4. Minion registration and example code updated to V1. 5. Functional tests updated to V1. 6. Gate test setup points to the new image. Co-Authored-By: Hongbin Lu <hongbin.lu@huawei.com> Change-Id: I046931ad491e8b7ee45943852901eac5c3df913e Partially-Implements: blueprint kubernetes-v1
Kubernetes API client code
Overview
This is Kubernetes API python client code. This code is generated by swagger-codegen. Kubernetes provide swagger-spec to generate client code for different versions. The specs live in Kubernetes repo.
See also
- swagger-codegen: https://github.com/swagger-api/swagger-codegen
- Kubernetes swagger-spec: https://github.com/GoogleCloudPlatform/kubernetes/tree/master/api/swagger-spec
Prerequisites
You need to install required packages for swagger codegen. Please refer to https://github.com/swagger-api/swagger-codegen#prerequisites
Steps to generate API client code
Steps to generate Kubernetes client code for v1:
Clone the Magnum repo:
git clone https://github.com/openstack/magnum.git
- * Clone the swagger-codegen repo. It is recommended to checkout a release
-
(e.g. v2.1.3) instead of using the master branch:
git clone https://github.com/swagger-api/swagger-codegen.git cd swagger-codegen/ git checkout tags/v2.1.3
Build swagger-codegen:
mvn package
Run below command to generate the API client code for Kubernetes:
cd .. java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar \ generate \ -i ./magnum/magnum/common/pythonk8sclient/templates/v1.json \ -l python -o ./KubernetesClientCode
Now you can check the code at location ./KubernetesClientCode.