Closed
Description
What happened (please include outputs or screenshots):
NOTE: This is a duplicate of #415 and #376 but those issues are closed.
I'm trying to create a CRD with python client 10.0.1 (kubernetes==10.0.1
) and with Kubernetes server 1.14 using the kubernetes.client.ApiextensionsV1beta1Api.create_custom_resource_definition() API
Body for the CRD:
{
'api_version': 'apiextensions.k8s.io/v1beta1',
'kind': 'CustomResourceDefinition',
'metadata': {
'labels': {'app.kubernetes.io/component': 'ingressroutes.traefik.containo.us',
'app.kubernetes.io/part-of': 'traefik'},
'name': 'ingressroutes.traefik.containo.us',
},
'spec': {
'group': 'traefik.containo.us',
'names': {
'kind': 'IngressRoute',
'plural': 'ingressroutes',
'singular': 'ingressroute'
},
'scope': 'Namespaced',
'version': 'v1alpha1',
},
}
This raises the following error:
raise ValueError("Invalid value for `conditions`, must not be `None`")
ValueError: Invalid value for `conditions`, must not be `None`
This issue is also reported #415 and #376 but those issues are closed as stale
Could someone help me in finding a patch for this?
What you expected to happen:
CRD Should be created
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
- Kubernetes version (
kubectl version
): 1.14 - OS (e.g., MacOS 10.13.6): MacOS 10.15
- Python version (
python --version
): 3.7.4 - Python client version (
pip list | grep kubernetes
): 10.0.1