Skip to content

Commit 5de6bed

Browse files
authored
Removal of user-defined mapping mentions
Signed-off-by: adamkenihan <[email protected]>
1 parent 42b45b1 commit 5de6bed

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

rfcs/NNNN-cdevents-provider/README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Must be one of `provisional`, `implementable`, `implemented`, `deferred`, `rejec
1919

2020
This RFC proposes to add a `Provider` type to the Flux notification-controller API for sending [CDEvents](https://github.com/cdevents).
2121

22-
When `Provider` objects configured to send CDEvents are alerted by a Flux event, they will utilise a user defined mapping of Flux and CDEvents events to send an appropriate CDEvent payload to a defined URL.
22+
When `Provider` objects configured to send CDEvents are alerted by a Flux event, they will utilise an already defined mapping of Flux and CDEvents events to send an appropriate CDEvent payload to a defined URL.
2323
<!--
2424
One paragraph explanation of the proposed feature or enhancement.
2525
-->
@@ -34,7 +34,7 @@ this RFC. Describe why the change is important and the benefits to users.
3434

3535
### Goals
3636

37-
Integrate [CDEvents](https://github.com/cdevents) into Flux with a CDEvents Provider that supports user mapping of flux to CDEvent events.
37+
Integrate [CDEvents](https://github.com/cdevents) into Flux with a CDEvents Provider that supports sending CDEvent events.
3838

3939
<!--
4040
List the specific goals of this RFC. What is it trying to achieve? How will we
@@ -52,7 +52,7 @@ and make progress.
5252

5353
## Proposal
5454

55-
Add CDEvents to the list of available `Providers` in Flux Notification controller. The user should be able to create mappings within the configuration of the `Provider` that dictates the CDEvent payload to send depending on the Flux event that triggered the alert. These CDEvent payloads should have meaningful data from the source event. There will be an initial focus on HelmRelease and related events as the format within Flux for those events is much more consistent.
55+
Add CDEvents to the list of available `Providers` in Flux Notification controller. The relevant CDEvent sent by the `Provider` will be determined by a pre-defined mapping of Flux events and relevant CDEvents. These CDEvent payloads should have meaningful data from the source event. There will be an initial focus on HelmRelease and related events as the format within Flux for those events is much more consistent.
5656
<!--
5757
This is where we get down to the specifics of what the proposal actually is.
5858
This should have enough detail that reviewers can understand exactly what
@@ -67,7 +67,7 @@ then this section can be replaced with the actual documentation.
6767

6868
Users of multiple CI/CD tools such as Tekton and Flux could use CDEvents as a way to enable interoperability.
6969

70-
For example, a user may want a Tekton `pipeline` to run once a HelmRelease flux resource has succeeded in a Helm install. On successful helm install, Flux will emit an event with reason `InstallSucceeded` which the user will have mapped in their `Provider` configuration to correspond to an `Environment.Modified` CDEvent. The CDEvent `Provider` will then send a payload with that CDEvent, which will also contain data from the Flux event, to a CloudEvents broker that Tekton is subscribed to, and trigger a Pipeline Run within Tekton.
70+
For example, a user may want a Tekton `pipeline` to run once a HelmRelease flux resource has succeeded in a Helm install. On successful helm install, Flux will emit an event with reason `InstallSucceeded` which will be mapped to an `Environment.Modified` CDEvent. The CDEvent `Provider` will then send a payload with that CDEvent, which will also contain data from the Flux event, to a CloudEvents broker that Tekton is subscribed to, and trigger a Pipeline Run within Tekton.
7171

7272
![User Stories Tekton](user-stories-provider.drawio.png)
7373

@@ -89,7 +89,7 @@ This is a good place to incorporate suggestions made during discussion of the RF
8989

9090
Adding a Flux `Provider` for CDEvents that will send a CDEvent payload upon receiving a flux event from an alert.
9191

92-
The user will be able to define a Flux `Provider` custom resource and deploy it to their cluster. This provider configuration will allow the user to define a mapping of which Flux events correspond to which CDEvent to send. Once an alert is triggered for this provider, it will send the corresponding CDEvent, based on the Flux event that caused the alert. This CDEvent will be created using the [CDEvents Go SDK](https://github.com/cdevents/sdk-go). As well as the user-defined mapping, the provider will include some default mappings for Flux-Helm events in the case that the user does not provide a custom mapping.
92+
Once an alert is triggered for this provider, it will send a CDEvent that corresponds to the Flux event that caused the alert. This CDEvent will be created using the [CDEvents Go SDK](https://github.com/cdevents/sdk-go). The implementation will include a defined mapping of which Flux events trigger a corresponding CDEvent.
9393

9494
The CDEvents broker is not a part of this design and is left to the users to set up however they wish.
9595

@@ -102,14 +102,10 @@ metadata:
102102
name: cdevents-provider
103103
namespace: flux-system
104104
spec:
105-
type: cdeventss
105+
type: cdevents
106106
secretRef:
107107
name: generic-token
108108
address: http://10.100.0.17:5000
109-
mapping:
110-
ReconciliationFinished: dev.cdevents.pipelinerun.finished
111-
GitOperationFailed: dev.cdevents.incident.reported
112-
113109
```
114110
115111
Example Default Mappings (Please note these are not final and will be open to discussion):

0 commit comments

Comments
 (0)