From b9f7b1d17565b8bd5cd3ee810c16ff9a65cd0af1 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Fri, 3 Jul 2020 11:15:34 +0300 Subject: [PATCH] Enable notifications for source events --- docs/guides/notifications.md | 8 ++++---- .../bases/notification-controller/kustomization.yaml | 4 ++-- manifests/bases/source-controller/kustomization.yaml | 11 +++++++++-- manifests/bases/source-controller/patch.yaml | 3 +++ 4 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 manifests/bases/source-controller/patch.yaml diff --git a/docs/guides/notifications.md b/docs/guides/notifications.md index 4ba92203..4fb116de 100644 --- a/docs/guides/notifications.md +++ b/docs/guides/notifications.md @@ -51,7 +51,7 @@ Elasticsearch, CloudWatch, Stackdriver, etc. ## Define an alert -Create an alert definition for the webapp kustomizations: +Create an alert definition for all repositories and kustomizations: ```yaml apiVersion: notification.fluxcd.io/v1alpha1 @@ -64,10 +64,10 @@ spec: name: slack eventSeverity: info eventSources: + - kind: GitRepository + name: '*' - kind: Kustomization - name: webapp-backend - - kind: Kustomization - name: webapp-frontend + name: '*' ``` Apply the above files or commit them to the `fleet-infra` repository. diff --git a/manifests/bases/notification-controller/kustomization.yaml b/manifests/bases/notification-controller/kustomization.yaml index 07291a16..4f111dc8 100644 --- a/manifests/bases/notification-controller/kustomization.yaml +++ b/manifests/bases/notification-controller/kustomization.yaml @@ -1,5 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- github.com/fluxcd/notification-controller/config//crd?ref=v0.0.1-alpha.2 -- github.com/fluxcd/notification-controller/config//manager?ref=v0.0.1-alpha.2 +- github.com/fluxcd/notification-controller/config//crd?ref=v0.0.1-beta.1 +- github.com/fluxcd/notification-controller/config//manager?ref=v0.0.1-beta.1 diff --git a/manifests/bases/source-controller/kustomization.yaml b/manifests/bases/source-controller/kustomization.yaml index cbb2a9e8..7b08a342 100644 --- a/manifests/bases/source-controller/kustomization.yaml +++ b/manifests/bases/source-controller/kustomization.yaml @@ -1,5 +1,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- github.com/fluxcd/source-controller/config//crd?ref=v0.0.1 -- github.com/fluxcd/source-controller/config//manager?ref=v0.0.1 +- github.com/fluxcd/source-controller/config//crd?ref=v0.0.2 +- github.com/fluxcd/source-controller/config//manager?ref=v0.0.2 +patchesJson6902: +- target: + group: apps + version: v1 + kind: Deployment + name: source-controller + path: patch.yaml diff --git a/manifests/bases/source-controller/patch.yaml b/manifests/bases/source-controller/patch.yaml new file mode 100644 index 00000000..e5ee6192 --- /dev/null +++ b/manifests/bases/source-controller/patch.yaml @@ -0,0 +1,3 @@ +- op: add + path: /spec/template/spec/containers/0/args/0 + value: --events-addr=http://notification-controller/