notification-controller icon indicating copy to clipboard operation
notification-controller copied to clipboard

notification controller as general purpose notification service beyond flux domain entitites

Open enekofb opened this issue 3 years ago • 3 comments

We would like to use a notification controller as a general-purpose notification service to send non-flux domain events leveraging its capabilities.

We have found that the CRD spec validates against flux-domain types and an issue exists around this topic with the suggested solution of patching the crds.

This issue would be to request / start the conversation for an enhancement to notification controller that would not require patching flux-owned crds.

enekofb avatar Nov 14 '22 12:11 enekofb

Thanks for sharing your thoughts @enekofb.

This ultimately would require a RFC, but we can expand on the idea here with some of the maintainers and the overall community.

Would you be able to expand on how you would see this working and what specific use cases you have in mind?

pjbgf avatar Nov 14 '22 15:11 pjbgf

We could remove the validation but in some cases the controller needs read access to the involved objects (Alert.spec.eventSources.matchLabels) and in some cases it needs write access (Receivers). To make the controller general-purpose, people would need to run it as cluster-admin so it can read/write to any involved objects in the cluster 😱

stefanprodan avatar Nov 14 '22 15:11 stefanprodan

Thanks for sharing your thoughts @enekofb.

This ultimately would require a RFC, but we can expand on the idea here with some of the maintainers and the overall community.

Would you be able to expand on how you would see this working and what specific use cases you have in mind?

Thanks @pjbgf for your reply,

The main motivation would be to leverage existing notification controller capabilities to make it work beyond flux domain to any other business domain.

In our context, within weave gitops we have discussed to use in the scenario of pipelines, to notify / signal external systems around promotions, for example, a promotion is requested or promotion has happened

But it would be equally applicable to other domains like policy, to notify around policy domain events like policy has been created or a policy X has been violated for an application Y

cluster management, etc ...

Let me know whether any other info would be required to help with context

Thanks

enekofb avatar Nov 16 '22 12:11 enekofb