Commit Graph

13 Commits

Author SHA1 Message Date
Stefan Prodan 224b12a2b8 Refactor notifiers to use Event API v1beta1
Signed-off-by: Hidde Beydals <hello@hidde.co>
2022-11-22 11:00:25 +00:00
Max Jonas Werner a76b9a0c63
Add "generic-hmac" Provider
This commit adds the "generic-hmac" Provider type for authenticating
webhook requests coming from notification-controller. I extended the
`Forwarder` notifier to accept an optional key used for generating the
HMAC. If the key is nil or empty no HMAC header is generated and the
forwarder behaves as before. If it is provided an `X-Signature` HTTP
header is added to the request carrying the HMAC.

I transformed the `TestForwarder_Post` test into a table-driven test
so that we can use the same setup and testing code for testing HMAC
and non-HMAC forwarder instances.

Any existing `X-Signature` header value set through
a `Provider.spec.secretRef` Secret's `header` field will be
overwritten.

closes #99

Signed-off-by: Max Jonas Werner <max@e13.dev>
2022-10-04 18:41:45 +02:00
Somtochi Onyekwere 25eeaf46dd Add .spec.timeout to Provider
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-31 11:25:09 +01:00
Philip Laine 2c69c847d3 Add context to Post function
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2022-07-27 18:26:28 +02:00
Moritz Schmitz von Hülst 3c7363234a Pass headers to generic provider through secretRef
Co-authored-by: Moritz Schmitz von H<C3><BC>lst <moritz@hauptstadtoffice.com>
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-01-26 12:39:02 +01:00
James Connor f0b206c661 Fixed missing setter for Forwarder CertPool
Co-authored-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-10-22 12:44:38 +02:00
Philip Laine 8f3b685f17 Add self signed cert to provider
Signed-off-by: Philip Laine <philip.laine@gmail.com>
2021-04-15 00:08:59 +02:00
Somtochi Onyekwere a99a0bc50d Use deepcopy method for event
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-03-22 09:40:16 +01:00
Kevin McDermott 9222181998 Add support for sending a component header from the forwarder.
This adds support for sending an HTTP header `gotk-component` with the
originating controller, this can be identifed in receiving servers.

Signed-off-by: Kevin McDermott <bigkevmcd@gmail.com>
2020-11-18 14:01:52 +00:00
Stefan Prodan 2437884a97
Change copyright to Flux authors
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-27 18:52:14 +02:00
Stefan Prodan 1f5d108d1d
Implement http(s) proxy for alerts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-17 14:21:20 +03:00
Hidde Beydals bb7c241c83 Change CRD domain 'notification.toolkit.fluxcd.io'
Due to required domain changes for the helm-controller so that it
can co-exist in a cluster with the Helm Operator, other Toolkit
components are moving to a *.toolklit.fluxcd.io domain too.
2020-07-30 22:32:07 +02:00
stefanprodan a44891b760 Add forwarder to notification providers 2020-07-01 15:59:24 +03:00