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

Event model and api mismatch. #2837

Closed
iocanel opened this issue Feb 25, 2021 · 3 comments · Fixed by #2907
Closed

Event model and api mismatch. #2837

iocanel opened this issue Feb 25, 2021 · 3 comments · Fixed by #2907
Assignees
Milestone

Comments

@iocanel
Copy link
Member

iocanel commented Feb 25, 2021

It seems that client.v1().events().list() return io.fabric8.kubernetes.api.model.Event while I would expect it to return it's v1 variant.

@rohanKanojia
Copy link
Member

rohanKanojia commented Feb 25, 2021

Umm, client.v1().events() provides Event class from kubernetes/api (which is used in kubectl get events). Are you talking about events.k8s.io/v1#Event ? I think we are missing DSL support for this.

@iocanel
Copy link
Member Author

iocanel commented Feb 25, 2021

I would expect v1().events() to operate on events.v1, is my assumption wrong?

@manusa
Copy link
Member

manusa commented Mar 1, 2021

As Rohan says, this DSL v1() points to core.v1 K8s API.
The events() method within the V1APIGroupDSL provides access to the Event v1 core resource (/api/v1/namespaces/{namespace}/events).

I think you are referring to the v1 Events API introduced in Kubernetes 1.19.

I would expect v1().events() to operate on events.v1, is my assumption wrong?

My assumption would be to access the events API through events().v1() or events().v1beta1(), but unfortunately those interfaces are missing :(. Also the model package/module should be different too.


So just to be clear, since this confuses many users and we probably need to figure out a way to make it clearer:

  • There are events in the core.v1 K8s API
  • There are events in the events.v1 and events.v1beta1 K8s API (apparently, currently unsupported)
  • There are WatchEvents provided by the Watch REST API spec.

@manusa manusa added this to the 5.2.0 milestone Mar 3, 2021
@manusa manusa modified the milestones: 5.2.0, 5.3.0 Mar 11, 2021
@rohanKanojia rohanKanojia self-assigned this Mar 15, 2021
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Mar 15, 2021
+ Add support for v1() and v1beta1() models for `events.k8s.io` APIGroup
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Mar 15, 2021
+ Add support for v1() and v1beta1() models for `events.k8s.io` APIGroup
manusa pushed a commit to rohanKanojia/kubernetes-client that referenced this issue Mar 26, 2021
+ Add support for v1() and v1beta1() models for `events.k8s.io` APIGroup
manusa pushed a commit that referenced this issue Mar 26, 2021
+ Add support for v1() and v1beta1() models for `events.k8s.io` APIGroup
@manusa manusa modified the milestones: 5.4.0, 5.3.0 Apr 8, 2021
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

Successfully merging a pull request may close this issue.

3 participants