Kubernetes-client: Event model classes from core/v1 have been lost

Created on 7 May 2020  路  9Comments  路  Source: fabric8io/kubernetes-client

Since #2137 (v1.10.0) the model classes

  • io.fabric8.kubernetes.api.model.Event
  • io.fabric8.kubernetes.api.model.EventList
  • io.fabric8.kubernetes.api.model.EventSeries

from the core/v1 API are missing. They were included in kubernetes-model-4.9.1.jar, but are now missing in kubernetes-model-core-4.10.0.jar.

bug

All 9 comments

Nope, these are the model classes of the (deprecated) events/v1beta1. They are not compatible with each other.

See https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#event-v1-core vs.
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#event-v1beta1-events-k8s-io

They can also be distinguished by kubernetes_core_Event and kubernetes_events_Event in kube-schema.json.

ah, I see. Apologies for inconvenience. Let me add them back.

@rohanKanojia Can you please take a look at KubernetesClient#events? Due to #2137 the import statements of the event classes have been changed (diff). In my oppinion they must be switched back to io.fabric8.kubernetes.api.model.*.

Actually, In #2206 I moved core events to client.v1().events() and kept client.events() to events/v1beta1. Do you think it would work for you?

Ahh, I see. Thank you for the hint.

@cheinema : Do you know if events/v1beta1 is used anywhere?

client.events() should be reverted to call the API version that was called previously (i.e. v1), in order to avoid breaking backwards compatibility.

As a way to move forward, the method should be annotated with Deprecated and a JavaDoc line added indicating the recommended new approach client.v1().events().

@manusa @cheinema : I will update #2206 to have client.events() using v1 Events. Thanks for your feedback.

Was this page helpful?
0 / 5 - 0 ratings