-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Improve Kubernetes events to be CloudEvents 1.0 compatible #85544
Comments
This one would be for @kubernetes/sig-instrumentation-feature-requests I think |
@tomkerkhove: Reiterating the mentions to trigger a notification: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This is fairly vague what this would mean in terms of changes. I would suggest that you join the sig instrumentation meetings and we start discussing this there. If there is some amount of interest, then I'd say we flesh out a KEP and understand what this would really mean for the project. The existing events API is replied upon by a lot of people so we can't just go and break it, it's literally an API with stability guarantees. |
I'm happy to join the bi-weekly call but the https://github.com/kubernetes/community/tree/master/sig-instrumentation points me to a temporary page due to a move. When is the next one? The current approach is a good start but there are a few things that can be improved:
Kubernetes Event Sample{
"action": null,
"apiVersion": "v1",
"count": 1,
"eventTime": null,
"firstTimestamp": "2019-11-25T09:34:16Z",
"involvedObject": {
"apiVersion": "v1",
"fieldPath": null,
"kind": "Pod",
"name": "order-processor-85ccb86f6-qfccj",
"namespace": "k8s-issue",
"resourceVersion": "165777",
"uid": "bf93d0c6-0f66-11ea-b446-00155d83711f"
},
"kind": "Event",
"lastTimestamp": "2019-11-25T09:34:16Z",
"message": "Successfully assigned k8s-issue/order-processor-85ccb86f6-qfccj to docker-desktop",
"metadata": {
"annotations": null,
"clusterName": null,
"creationTimestamp": "2019-11-25T09:34:16Z",
"deletionGracePeriodSeconds": null,
"deletionTimestamp": null,
"finalizers": null,
"generateName": null,
"generation": null,
"initializers": null,
"labels": null,
"managedFields": null,
"name": "order-processor-85ccb86f6-qfccj.15da5e1339c58574",
"namespace": "k8s-issue",
"ownerReferences": null,
"resourceVersion": "165783",
"selfLink": "/api/v1/namespaces/k8s-issue/events/order-processor-85ccb86f6-qfccj.15da5e1339c58574",
"uid": "bf9aaf5c-0f66-11ea-b446-00155d83711f"
},
"reason": "Scheduled",
"related": null,
"reportingComponent": "",
"reportingInstance": "",
"series": null,
"source": {
"component": "default-scheduler",
"host": null
},
"type": "Normal"
} Just to be clear - I am not saying the current approach sucks, I'm just suggesting to use a CNCF-supported standard instead, please don't get me wrong! I fully understand that there are a lot of customers on the current eventing API and I'm not suggesting to just kill this but merely have them side-by-side or provide a migration to CloudEvents. |
Please don't forget about "binary" vs "structured" CloudEvents. CloudEvents supports the idea of not changing an existing event/message to become a CloudEvent. You just add a few extra bits of metadata (e.g. http headers). You could also use the CloudEvents defined structure too if you want, but it's not required. |
Oh that's right - So if we add the additional (HTTP) headers we can get the metadata without changing the effective event payload we have today - Is that correct? |
correct - as long as the receiver can handle "binary" CloudEvents |
Here's the spec on that - That would be the perfect middle ground I think! |
Next meeting on Nov 28th. Welcome. Meeting notes: https://docs.google.com/document/d/17emKiwJeqfrCsv0NZ2FtyDbenXGtTNCsDEiLbPa7x7Y |
I'll try to join day after tomorrow, or is it cancelled due to Thanksgiving? |
Thanks for checking - I'll join but if nobody shows up join later on instead. |
some discussion in this thread about structured logging- just want to create a link here to kubernetes/enhancements#1367 , which is an enhancement for structured logging. |
I think we're on the same page.
This is the possibility I see for something like this as well. It would need to be fleshed out in detail though. |
Awesome, happy to help where I can. |
I've updated the title to indicate that it's more about compatibility rather than change/impact current approach drastically. |
Adding @kubernetes/sig-api-machinery-feature-requests as discussed in the SIG instrumentation standup. I will provide a sample based on Kubernetes event in next couple of days. |
@tomkerkhove: Reiterating the mentions to trigger a notification: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There are people involved in sig instrumentation spread all over the world, it's never ideal for everyone, I'd prefer not to deviate from normal meetings. As this isn't too pressing, what do you think about dedicating the meeting after that to this topic? |
That would be 23rd of January then? Fine for me, does that work for you @duglin? |
Yes exactly the 23rd of January. If that works for you feel free to put it into the meeting notes already. |
Fine for me, will add if @duglin agrees as well. |
This won't work I guess, but can only try: /remove-lifecycle stale Eventually we'll get there, just need to have time to work out a POC. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@tomkerkhove this needs a KEP, it can't be implemented in the scope of an issue so we can ensure this gets the necessarily visibility. |
Please ignore my ignorance but how does one write a KEP and do I need to understand the Kubernetes codebase? |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten I'll write a KEP at some point |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
/lifecycle frozen |
Thank you! |
As of today, Kubernetes already provides extension points by emitting events by different SIGs - This is great!
However, there are a few hurdles:
What would you like to be added: Now that CloudEvents has reached the 1.0 milestone it would be good if Kubernetes could start emitting events in that format.
As part of that transition, I would love to use this change to build a centralized list with all the events and their subjects to make it easier to consume htem.
Why is this needed: Emitting events according to the CloudEvent specification would make it easier for external tools and vendors to plug in and extend Kubernetes where they have to.
/cc @clemensv
The text was updated successfully, but these errors were encountered: