An invalid url scheme could be used in urlopen in the python k8s swagger client to violate security. Validate that the URL is either http or https and turn off noise from bandit. Change-Id: I15fe8f9953e526beb25d84895ed3925a758ccda4 Implements: blueprint gate-bandit
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
Steps to generate API client code
Steps to generate Kubernetes client code for v1beta3:
Clone the Kubernetes repo.
git clone https://github.com/GoogleCloudPlatform/kubernetes.git
Clone the swagger-codegen repo.
git clone https://github.com/swagger-api/swagger-codegen.git
Run below command to generate the API client code for Kubernetes.
java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i ./kubernetes/api/swagger-spec/v1beta3.json -l python -o ./KubernetesClientCode
Now you can check the code at location ./KubernetesClientCode.