kubernetes-client / c

Official C client library for Kubernetes
Apache License 2.0
141 stars 45 forks source link

Regarding Event Internals (Event broadcaster, Event recorder) for C client #145

Closed smuraligit closed 1 year ago

smuraligit commented 1 year ago

Hope you are well.

Thank you for this initiative of having C Kubernetes client.

I have seen client-go has event interfaces like Broadcaster, Recorder and other API to create events. However, I am not seeing the similar interfaces in C Kubernetes client. Is this something that needs to be ported/created for C? Or am I not seeing the correct files for the same?

Could you please guide me as I am starting with Kubernetes C client? I see API to create the event by invoking API server.

Looking forward to hearing from the community.

Best, -Srini

ityuhui commented 1 year ago

There are not any high level utilities e.g. Broadcaster, Recorder like client-go/tools/events for events in the C client now.

You need to manage the events youself, e.g. call API CoreV1API_createNamespacedEvent to create an event.

See the full list of APIs at here

smuraligit commented 1 year ago

There are not any high level utilities e.g. Broadcaster, Recorder like client-go/tools/events for events in the C client now.

You need to manage the events youself, e.g. call API CoreV1API_createNamespacedEvent to create an event.

See the full list of APIs at here

Thank you very much for your reply.

When you say there are not any high level utilities in C client now, does that mean in future, there might be? Or if there is volunteering contribution for high level API, would that be accepted?

Reason we are after that high level utilities is because they provided advantages like deduplication at event source. If we just manage with CoreV1API_createNamespacedEvent, then we need to add deduplication logic. You can find more details at https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/383-new-event-api-ga-graduation

Thanks, Srini

ityuhui commented 1 year ago

When you say there are not any high level utilities in C client now, does that mean in future, there might be? Or if there is volunteering contribution for high level API, would that be accepted?

Yes. Contribution is very welcome !

brendandburns commented 1 year ago

+1, we'd be happy to have the contributions. There are various degrees of high-level utilities in the other clients (e.g. https://github.com/kubernetes-client/java/tree/master/extended/src/main/java/io/kubernetes/client/extended)

smuraligit commented 1 year ago

Thank you for your response. This is helpful. For now, I will close this issue. If we decide to come up with high level utilities for event, I will open up a new issue and submit PR.

Thank you very much! -Srini