Delete Namespace response json deserialization exception
See original GitHub issueI am trying to delete a namespace using
StatusV1 delStatus = await client.NamespacesV1().Delete(nsName);
The api call actually works and k8s does what it needs to do. It is the deserialization of the response that fails. Some specifically the Status property.
Here is the JSON response from k8s:
{“kind”:“Namespace”,“apiVersion”:“v1”,“metadata”:{“name”:“xxxxxxxxxx”,“selfLink”:“/api/v1/namespaces/xxxxxxxxxx”,“uid”:“0499e242-1a87-11e9-9f35-000d3a44ebb6”,“resourceVersion”:“1130958”,“creationTimestamp”:“2019-01-17T18:38:01Z”,“deletionTimestamp”:“2019-01-17T18:40:39Z”,“labels”:{“name”:“xxxxxxxxxx”},“annotations”:{“kubectl.kubernetes.io/last-applied-configuration”:“{"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{},"labels":{"name":"xxxxxxxxxx"},"name":"xxxxxxxxxx"}}\n”}},“spec”:{“finalizers”:[“kubernetes”]},“status”:{“phase”:“Terminating”}}
Notice at the very end "status":{"phase":"Terminating"}}
The current model StatusV1
has type string
in the property Status
: StatusV1.cs#L47
Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (8 by maintainers)
Top GitHub Comments
See https://github.com/tintoy/dotnet-kube-client/commit/9d11ac1e7f3f376f810797e2e3d26deaf787ec02 for details of what was fixed. I’ll push out a new version shortly.
Thanks!