• Stars
    star
    243
  • Rank 160,261 (Top 4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 3 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Affordable notifications for Kubernetes

Notifications Engine

Notifications Engine is a configuration-driven Golang library that provides notifications for cloud-native applications. The project provides integration with dozen of services like Slack, MS Teams, Mattermost, SMTP, Telegram, Netgenie, and the list keeps growing.

Why Use It?

The first class notifications support is often eschewed feature in Kubernetes controllers. This is challenging because notifications are very opinionated by nature. It is hard to predict what kind of events end-users want to be notified about and especially how the notification should look like. Additionally, there are lots of notification services so it is hard to decide which one to support first.The Notifications Engine is trying to tackle both challenges:

  • provides a flexible configuration-driven mechanism of triggers and templates and allows CRD controller administrators to accommodate end-user requirements without making any code changes;
  • out of the box integrates with dozen of notifications services (Slack, SMTP, Telegram etc) with many integrations yet to come;

Features

Using the engine CRD controller administrators can configure a set of triggers and templates and enable end-users to subscribe to the required triggers by just annotating custom resources they care about.

The example below demonstrates the Argo CD specific configuration:

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-notifications-cm
data:
  trigger.on-sync-status-unknown: |
    - when: app.status.sync.status == 'Unknown'
      send: [app-sync-status]

  template.app-sync-status: |
    message: |
      Application {{.app.metadata.name}} sync is {{.app.status.sync.status}}.
      Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.

  service.slack: |
    token: $slack-token
---
apiVersion: v1
kind: Secret
metadata:
  name: argocd-notifications-secret
stringData:
  slack-token: <my-slack-token>

The end-user can subscribe to the triggers they are interested in by adding notifications.argoproj.io/subscribe/<trigger>/<service>: <recipients> annotation:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  annotations:
    notifications.argoproj.io/subscribe.on-sync-succeeded.slack: my-channel1;my-channel2

If there is more than one trigger and multiple destinations you can configure the annotation as given below.

notifications.argoproj.io/subscriptions: |
  - trigger: [on-scaling-replica-set, on-rollout-updated, on-rollout-step-completed]
    destinations:
      - service: slack
        recipients: [my-channel-1, my-channel-2]
      - service: email
        recipients: [recipient-1, recipient-2, recipient-3 ]
  - trigger: [on-rollout-aborted, on-analysis-run-failed, on-analysis-run-error]
    destinations:
      - service: slack
        recipients: [my-channel-21, my-channel-22]

Getting Started

Ready to add notifications to your project? Check out sample notifications for cert-manager

Users

Additional Resources

More Repositories

1

argo-cd

Declarative Continuous Deployment for Kubernetes
Go
16,002
star
2

argo-workflows

Workflow Engine for Kubernetes
Go
14,170
star
3

argo-rollouts

Progressive Delivery for Kubernetes
Go
2,424
star
4

argo-events

Event-driven Automation Framework for Kubernetes
Go
2,211
star
5

gitops-engine

Democratizing GitOps
Go
1,627
star
6

argo-helm

ArgoProj Helm Charts
Mustache
1,503
star
7

argocd-example-apps

Example Apps to Demonstrate Argo CD
Jsonnet
1,331
star
8

applicationset

The ApplicationSet controller manages multiple Argo CD Applications as a single ApplicationSet unit, supporting deployments to large numbers of clusters, deployments of large monorepos, and enabling secure Application self-service.
Go
584
star
9

argoproj

Common project repo for all Argo Projects
Python
545
star
10

argo-ui

Argoproj shared React components
TypeScript
208
star
11

argoproj-deployments

Deployment repository for Argoproj CI/CD
HCL
199
star
12

argo-ci

Continuous integration and delivery for Kubernetes powered by Argo workflows.
TypeScript
197
star
13

rollouts-demo

Go
168
star
14

data-pipeline

Python
34
star
15

pkg

Argo shared libraries between argo projects
Go
32
star
16

argo-ml-demo

Demonstration of using an Argo workflow for an ML application
Python
28
star
17

argo-schema-generator

Tool that generates a kustomize schema file for Argo CD, Argo Rollouts, Argo Workflows, and Argo Events
Go
22
star
18

argo-site

JavaScript
16
star
19

argo-cd-ui

TypeScript
15
star
20

homebrew-tap

Homebrew Tap for argo
Ruby
14
star
21

argo-cd-hello-world-app

A basic golang app with a travis pipeline that deploys into a k8s cluster using Argo-CD
Makefile
14
star
22

argocon21

JavaScript
8
star
23

ui-lib

TypeScript
5
star
24

argoproj.github.io

Generated from https://github.com/argoproj/argo-site
HTML
4
star
25

argo-cd-hello-world-config

Shell
4
star
26

argo-conformance-program

A standard to ensure interoperability, protect users, and prevent surprises when using commercial offerings with Argo in the name.
4
star
27

community-contrib-docs

3
star
28

argo-events-old

This repo is now obsolete. Please check out https://github.com/argoproj/argo-events
3
star
29

image-processing-demo

Python
3
star
30

kubecon-sandbox

KubeCon Sandbox for demonstrating Argo CD
Shell
3
star
31

kubeflow-ks

Example repo that stores the ksonnet files of Kubeflow v0.3.0
Shell
2
star
32

.github

2
star
33

katacoda-scenarios

Shell
1
star