Remove limitation on "spec.eventSources.kind"
Hey, I thought it would be really useful to be able to send notifications for any kind of general Kubernetes events via the notification-controller, instead of limiting it to only supporting events from other toolkit components. I've started on a project, one-model/event-bridge-controller, for doing just that, which I hope to ultimately contribute back to Flux.
However, I've hit a snag with the validation performed on spac.eventSource.kind
https://github.com/fluxcd/notification-controller/blob/c4377ceb51f0ed969aa3fac1c151189bfa18d7fc/api/v1beta1/reference_types.go#L26-L29
While I'm able to send events for arbitrary resources to Kubernetes, I can't create an Alert resource which will actually allow those events to be forwarded onwards to a Provider.
Would it be possible to remove this validation to allow an Alert to specify any kind of resource?
Some more context...
I had looked into other solutions for sending Kubernetes events to Slack, but the only project I could find which seemed somewhat mature was https://github.com/bitnami-labs/kubewatch, but it hasn't been updated since Sept. 2020.
Given the notification-controller already handles taking alerts and sending them somewhere, I figured creating another controller to handle taking Kubernetes events and translating them into notification-controller events would allow me to leverage that functionality.
Given how similar the two interfaces are, that was actually really easy. The core reconciliation loop for the event-bridge-controller is barely 30 lines.
Looks like by manually removing the enum validation in the CustomResourceDefinition, I was able to create an Alert for a non-toolkit resource.

Thank you for taking a look at this and helping us understand how this can be implemented!
I'm not sure if this is in the scope of Notification Controller, or if it is really only meant to be used with Flux resources. It seems like it isn't very complicated to extend the behavior to CRDs that community members have contributed, or even broader any type of resources that emit events.
Is there any guidance we can provide about whether this can be merged or if it is something that Flux wants to have in scope? This is a question for the maintainers to address.
(I've put the cart a bit in front of the horse because it's not presented in the form of a PR, but you're doing this right, IMHO we want folks to ask before spending a lot of time on a PR, for your own sake, we don't want anyone to spin your wheels on a PR that might not get merged.)
We've documented how to add other kinds to the CRD: https://fluxcd.io/flux/cheatsheets/bootstrap/#enable-notifications-for-third-party-controllers