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

DeserializationFailure when performing service delete in K8s 1.23+ #399

Open
paul-lysak opened this issue Sep 30, 2022 · 2 comments
Open

Comments

@paul-lysak
Copy link

Having com.coralogix.zio.k8s.client.kubernetes.Kubernetes instance in k8s variable try to delete any Service object in Kubernetes 1.23.0 or newer:

k8s.v1.services.delete(name = "someService", namespace = K8sNamespace("someNamespace"), deleteOptions = DeleteOptions(), propagationPolicy = Option(PropagationPolicy.Background))

The service is deleted, but the call returns an error:

DeserializationFailure(K8sRequestInfo(K8sResourceType(services,,v1),delete,Some(K8sNamespace(wssaas-165339d4-d035-46f2-9c2a-fd555ef2d2c3)),None,None,Some(ws-oqbpwsaj)),NonEmptyList(DecodingFailure(Got value '{"loadBalancer":{"ingress":[{"ip":"10.96.173.240"}]}}' with wrong type, expecting string, List(DownField(status)))))

The reason is that starting from release v1.23.0-alpha.2 K8s API has changed response type for service delete from #/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status to #/definitions/io.k8s.api.core.v1.Service.
(compare https://raw.githubusercontent.com/kubernetes/kubernetes/v1.23.0-alpha.1/api/openapi-spec/swagger.json vs https://raw.githubusercontent.com/kubernetes/kubernetes/v1.23.0-alpha.2/api/openapi-spec/swagger.json).

@vigoo
Copy link
Collaborator

vigoo commented Sep 30, 2022

Maybe we should start releasing multiple versions for different K8s versions.. @iravid @jkobejs what do you think?

@iravid
Copy link
Member

iravid commented Sep 30, 2022

I can probably dig up a Slack message from last year in which I suggested that 😂 definitely agree we should do that

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

3 participants