Open paul-lysak opened 2 years ago
Maybe we should start releasing multiple versions for different K8s versions.. @iravid @jkobejs what do you think?
I can probably dig up a Slack message from last year in which I suggested that 😂 definitely agree we should do that
Having
com.coralogix.zio.k8s.client.kubernetes.Kubernetes
instance ink8s
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).