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

Client does not accept null subsets in endpoint objects #463

Closed
hanikesn opened this issue Feb 24, 2018 · 1 comment
Closed

Client does not accept null subsets in endpoint objects #463

hanikesn opened this issue Feb 24, 2018 · 1 comment

Comments

@hanikesn
Copy link

Neither version 4.0.0 nor 5.0.0 accept Endpoint objects from kubernetes 1.8, which don't have any endpoints defined. According to the official documentation json clients should accept both empty arrays as well as null values.

See:

Protobuf serialization does not distinguish between [] and null.
https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.8.md#action-required-2

apiVersion: v1
kind: Endpoints
metadata:
  creationTimestamp: 2017-12-08T13:33:24Z
  labels:
    app: zero-test
    expose: http
  name: zero-test
  namespace: default
  resourceVersion: "40308257"
  selfLink: /api/v1/namespaces/default/endpoints/zero-test
  uid: 5d47e6c7-dc1c-11e7-85ba-0244ea825020
subsets: null
  File "/home/steffen/dev/ingress-nginx-plus/env/lib/python3.6/site-packages/kubernetes/client/models/v1_endpoints.py", line 64, in __init__
    self.subsets = subsets
  File "/home/steffen/dev/ingress-nginx-plus/env/lib/python3.6/site-packages/kubernetes/client/models/v1_endpoints.py", line 156, in subsets
    raise ValueError("Invalid value for `subsets`, must not be `None`")
ValueError: Invalid value for `subsets`, must not be `None`
@mbohlool
Copy link
Contributor

dup of #376

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants