In order to streamline the docs across all controllers, the CRD spec
file names are pluralized. This lets us better automate docs generation
from CRD specs.
refs fluxcd/website#1577
Signed-off-by: Max Jonas Werner <mail@makk.es>
Receiver .status.url was deprecated in v1beta2 API and replaced with
.status.webhookPath. Remove it from v1 API and all references to it.
Signed-off-by: Sunny <darkowlzz@protonmail.com>
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>
This has been introduced in #482 but we actually want this feature to
only be available in v1 of the API. A follow-up PR will re-add this to
the v1 API.
Signed-off-by: Max Jonas Werner <mail@makk.es>
Plus addressing of a couple of nits.
The following must still be picked up at a later moment:
- More sections need to be moved from "working with" to "writing a ..."
- Documentation flow can likely be improved once the sections have been
moved.
- Technical description of the behavior of the Provider types could be
improved, this should be easier to do when everything has the same
format.
Signed-off-by: Hidde Beydals <hello@hidde.co>
- Extensively document the various Receiver types, their validation
mechanics and their caveats.
- Move various things around a bit to ensure we follow the same flow
as the rewritten source-controller specs.
- Explicitly document the expected format of the Secret.
- Various other small rewordings and fixes.
Signed-off-by: Hidde Beydals <hello@hidde.co>
Periodically reconcile providers and receivers with their
Secret references to surface config errors after initialisation.
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
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>