Status content could be very long compare to other fields. Moving it to
the end helps improve the visibility of other fields.
Signed-off-by: Sunny <darkowlzz@protonmail.com>
Introduce the flag `--no-cross-namespace-refs` (defaults to false) for allowing cluster admins to disable cross-namespace event sources for alerts.
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Updating to the latest versions of the flux pkg components and a small
adjustment due to
a26ceb22f0
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
This commit adds the alertmanager provider. The provider adds some
generic labels based on the event which should be enough to configure
appropraite routes within alertmanager.
The alert is annotated with the message by default and optionally by the
summary field given in the event.
Signed-off-by: Alan Hollis <me@alanhollis.com>
This sets the `status.observedGeneration` field to -1 by default. This
is a follow-up to https://github.com/fluxcd/helm-controller/pull/294,
porting the same code to the notification-controller so that all Flux
2 controllers work the same way in this regard.
Signed-off-by: Max Jonas Werner <mail@makk.es>
As with ImageUpdateAutomation, it's useful to allow alerts to process
events from ImagePolicy objects. Letting them be the target of webhook
triggers is not useful, since they don't support the reconcile request
protocol -- but is better than making a special case for them.
Signed-off-by: Michael Bridgen <michael@weave.works>
This adds ImageUpdateAutomation as a kind allowed by cross-namespace
object references here. That has two effects:
- ImageUpdateAutomation objects can be the source of events; and,
- ImageUpdateAutomation objects can be the target of webhook
triggers.
Of these, the first is certainly desirable (e.g,. now you can post a
Slack message when automation fails). The second may be useful, though
automations will more usually be triggered by ImageRepository objects
changing, and anyway doesn't hurt.
Signed-off-by: Michael Bridgen <michael@weave.works>
- 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>
This commit upgrades the `controller-runtime` dependency to `v0.7.0`,
including all changes required to make all wiring work again.
- Upgrade `runtime` to v0.6.0 to include `controller-runtime` changes.
- Loggers have been removed from the reconcilers and are now retrieved
from the `context.Context` passed to the `Reconcile` method and
downwards functions.
- Logger configuration flags are now bound to the flag set using
`BindFlags` from `runtime/logger`, ensuring the same contract across
GitOps Toolkit controllers, and the `--log-json` flag has been
deprecated in favour of the `--log-encoding=json` default.
- The `ChangePredicate` from `runtime` has changed to a
`ReconcilateAtChangedPredicate`, and is now chained with the
`GenerationChangedPredicate` from `controller-runtime` using
`predicate.Or`.
- The `leader-election-role` was changed, as leader election now works
via the `coordination/v1` API.
Other notable changes:
- Use `DeletionTimestamp` of resource object to determine readiness.
- `source-controller` API dependency has been upgraded to `v0.6.0`
which also uses `controller-runtime` `v0.7.0`.
Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com>
Signed-off-by: Philip Laine <philip.laine@gmail.com>
Signed-off-by: Hidde Beydals <hello@hidde.co>
- `github.com/fluxcd/pkg/apis/meta` to `v0.5.0`
- `github.com/fluxcd/pkg/runtime` to `v0.4.0`
- `github.com/fluxcd/source-controller/api` to `v0.5.1`
- `k8s.io/{api,apiextensions-apiserver,apimachinery,cli-runtime,client-go}` to `v0.19.4`
- `sigs.k8s.io/controller-runtime` to `v0.6.4`
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>