Commit Graph

61 Commits

Author SHA1 Message Date
Matheus Pimenta 3dc0b66390
Improvements after CEL resource filtering
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-12 16:46:59 +00:00
Matheus Pimenta c4eed6b243
Fix add missing return statement and a few style issues
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-12 11:17:50 +00:00
Kevin McDermott 28deef923f
Implement Receiver resource filtering with CEL
Signed-off-by: Kevin McDermott <bigkevmcd@gmail.com>
Co-authored-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-02-10 16:21:50 +00:00
Matheus Pimenta b362a258fe
Enforce namespace check on receiver
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2025-01-30 10:27:01 +00:00
Stefan Prodan b2ab2c2b07
Update go-github to v63
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-09-26 15:05:47 +03:00
Sunny 3585b77c40 Fix CDEvents API usage and tests
Signed-off-by: Sunny <github@darkowlzz.space>
2024-09-25 23:31:05 +00:00
Matheus Pimenta bd12728d0f Upgrade dependencies
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
2024-08-15 09:03:03 -03:00
Stefan Prodan 3aba5bbd39
Update Helm APIs to v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2024-05-02 21:00:30 +03:00
adam b4949b6e05 Implement CDEvents Receiver
Signed-off-by: adamkenihan <adam.kenihan@est.tech>

Added CDEvents Receiver

Signed-off-by: adamkenihan <adam.kenihan@est.tech>

Added CDEvent Validation + Tests

Signed-off-by: adamkenihan <adam.kenihan@est.tech>

Small changes to CDEvent Receiver

Signed-off-by: adamkenihan <adam.kenihan@est.tech>

More CDEvents Tests and Docs added

Signed-off-by: adamkenihan <adam.kenihan@est.tech>

Adding imports to go.mod

Signed-off-by: adamkenihan <adam.kenihan@est.tech>

small changes + manifests and formatting

Signed-off-by: adamkenihan <adam.kenihan@est.tech>

Changing string compare to EqualFold

Signed-off-by: adamkenihan <adam.kenihan@est.tech>
2024-03-27 10:36:51 +00:00
Hidde Beydals 3dce75a07e
misc: fix hypothetical implicit memory aliasing
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-11 15:02:56 +02:00
Hidde Beydals 23d57eb9d3
misc: use `strings.EqualFold`
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 12:07:31 +02:00
Hidde Beydals 30db06d0df
misc: do not capitalize err strings
Except for where names are being used (e.g. `Authorization` header,
Nexus, etc.)

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-10-10 12:07:30 +02:00
Somtochi Onyekwere 4f5d2dfdb8 use TrimPrefix instead of TrimLeft
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-08-01 16:31:15 +01:00
Stefan Prodan 749a6c4cb7
Update dependencies
- k8s.io/* v0.27.3
- cloud.google.com/go/pubsub v1.31.0
- github.com/Azure/azure-event-hubs-go/v3 v3.6.0
- github.com/getsentry/sentry-go v0.22.0
- github.com/google/go-github/v53 v53.2.0
- github.com/ktrysmt/go-bitbucket v0.9.60
- github.com/xanzy/go-gitlab v0.86.0
- github.com/fluxcd/pkg/runtime v0.39.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-06-27 11:16:42 +03:00
Stefan Prodan 13fe515890
Update dependencies
- github.com/Azure/azure-amqp-common-go/v4 v4.1.0
- github.com/Azure/azure-event-hubs-go/v3 v3.5.0
- github.com/fluxcd/pkg/runtime v0.35.0
- github.com/getsentry/sentry-go v0.20.0
- github.com/go-logr/logr v1.2.4
- github.com/google/go-github/v52 v52.0.0
- github.com/ktrysmt/go-bitbucket v0.9.56
- github.com/xanzy/go-gitlab v0.83.0
- golang.org/x/oauth2 v0.7.0
- sigs.k8s.io/controller-runtime v0.14.6

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2023-05-08 16:34:30 +03:00
Sanskar Jaiswal 00fab6693b
index receivers using webhook path as key
Use `.status.webhookPath` as a key to index Receivers. Use this key
while listing Receivers during the handling of a payload.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-05-03 16:32:38 +05:30
Max Jonas Werner 75b1cc109f
Use GitRepository v1 as default version in receiver handler
v1 will be the default version in the upcoming version of n-c.

Signed-off-by: Max Jonas Werner <mail@makk.es>
2023-03-30 15:48:42 +02:00
Max Jonas Werner ec03bd20a3
Introduce v1 API and bump Receiver version to v1
This commit bumps the Receiver API version to v1 in preparation of
the Flux GitOps GA milestone
(https://fluxcd.io/roadmap/#flux-gitops-ga-q1-2023).

We are now actively maintaining two versions of the notification API
group in parallel: v1 which currently only holds the Receiver kind and
v1beta2 for all other kinds.

Since we haven't run into this situation before, I had to change the
way we expose the API docs in ./docs/api: The directory now has
sub-directories for each active API version. Therefore we need to
change our scripts in the website repository to take this change into
account so that we expose both API group version at
https://fluxcd.io/flux/components/notification/api/. This change is
implemented in https://github.com/fluxcd/website/pull/1427.

refs #436

Signed-off-by: Max Jonas Werner <mail@makk.es>
2023-03-30 15:40:54 +02:00
Somtochi Onyekwere 4fcde0026d add docs and log when no objects are found
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2023-03-20 22:20:54 +01:00
Raffael Sahli 57f62f400c
feat: support multi receiver by matchLabels
Signed-off-by: Raffael Sahli <raffael.sahli@doodle.com>
2023-03-20 08:11:30 +00:00
Hidde Beydals 7448a667a0
receiver: update default ImageRepository version
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-02-28 11:14:42 +01:00
Stefan Prodan d16588a193 Deprecate `Receiver.status.url` in favor of `.status.webhookPath`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-09 12:05:51 +00:00
Stefan Prodan 5fd17e6220 Refactor the Receiver URL generation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-09 12:05:51 +00:00
Stefan Prodan 974a77da00 Refactor reconcilers and introduce v1beta2 API
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-12-09 11:03:53 +00:00
Somtochi Onyekwere db485228dd remove code for parsing github payload
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-10 21:19:22 +01:00
Soule BA 44f5b43a4c
Update flux types api versions
Signed-off-by: Soule BA <bah.soule@gmail.com>
2022-06-07 15:44:40 +02:00
Paulo Gomes a0dc84e36a
Small fixes
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-05-24 07:20:15 +01:00
Somtochi Onyekwere ae5fbba16b Use PartialMetadata for annotating objects
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-02-17 11:02:20 +01:00
Stefan Prodan 6ffaef2a41
Update dependencies (fix CVE-2021-43565)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-11 13:21:26 +02:00
Somtochi Onyekwere 19a0daa906 Use conditions helper in reconciler
Co-authored-by: Piaras Hoban <piaras@weave.works>
Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com>
Co-authored-by: souleb <bah.soule@gmail.com>
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-11-01 14:20:12 +01:00
Ali AKCA 7ded18f850
chore: Drop deprecated io/ioutil
Signed-off-by: Ali AKCA <ali@akca.io>
2021-10-27 09:44:51 +02:00
Stefan Prodan 9b5d9d0b2b
Update Git providers
- go-github v39.0.0
- go-bitbucket v0.9.26
- go-gitlab v0.50.4

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-17 12:43:51 +03:00
Hidde Beydals e7bb4c90c4 Request reconcile using patch instead of update
This should prevent the generation of the object getting bumped, as
observed on a GKE K8s 1.18 cluster using the  logic before this commit.

We only want to generation to increase when there are actual changes to
the `spec` of a resource, as some controllers use the `generation`
value to make assumptions about what they should do during a
reconciliation.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2021-07-09 17:55:50 +02:00
Stefan Prodan 78fa2d103a
Use controller-runtime structured logging
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-15 14:06:04 +02:00
Somtochi Onyekwere 4a68a61289 add acr webhook
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-03-05 12:34:11 +01:00
Somtochi Onyekwere 9aba08e6bf Uses unstructured client to annotate object
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-03-04 08:01:53 +01:00
Somtochi Onyekwere bcc3bac747 align space
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-01-21 09:30:20 +01:00
Somtochi Onyekwere f9fc7292b3 Add generic-hmac implementation
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-01-21 09:12:01 +01:00
Somtochi Onyekwere 9e37e307ef run make test
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-01-20 12:43:08 +01:00
Somtochi Onyekwere 6f299d5229 Add webhook for nexus
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-01-20 12:40:17 +01:00
Somtochi Onyekwere 07bca13213 Adds gcr notification webhook
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-01-18 12:09:24 +01:00
Somtochi Onyekwere 29e3805c2f Updates docs
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-01-15 13:52:21 +01:00
Somtochi Onyekwere 201fb66617 add quay webhook
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-01-15 13:37:58 +01:00
Stefan Prodan 4e63d79514
Implement DockerHub webhook receiver
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-14 16:57:31 +02:00
Stefan Prodan c148d6a036
Trigger ImageRepository reconciliation with webhook receivers
- Add ImageRepository to the Receiver API known kinds and RBAC
- Trigger container image updates to Git by annotating ImageRepository objects

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-14 14:16:13 +02:00
Stefan Prodan 4bfeabbda7
Lookup ready receivers in all namespaces
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-06 10:11:42 +02:00
Sylvain Rabot 35284dc511
Fix typo
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2020-11-13 11:38:58 +01: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 e02c336582
Use reconcile request annotation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-27 17:36:39 +02:00
stefanprodan d90acda9e6 Promote API to v1beta1 2020-09-30 18:21:17 +03:00