kube-job-notifier

For kubernetes job notification tool

Description

Usage

Notification setting(Slack only)

export SLACK_TOKEN=YOUR_SLACK_TOKEN
export SLACK_CHANNEL=YOUR_NOTIFICATION_CHANNEL_ID
export SLACK_STARTED_NOTIFY=true # OPTIONAL DEFAULT true
export SLACK_SUCCEEDED_NOTIFY=true # OPTIONAL DEFAULT true
export SLACK_FAILED_NOTIFY=true # OPTIONAL DEFAULT true
export SLACK_USERNAME=YOUR_NOTIFICATION_USERNAME # OPTIONAL
export SLACK_SUCCEED_CHANNEL=YOUR_NOTIFICATION_CHANNEL_ID # OPTIONAL
export SLACK_FAILED_CHANNEL=YOUR_NOTIFICATION_CHANNEL_ID # OPTIONAL
export DATADOG_ENABLED=true # OPTIONAL DEFAULT false
export NAMESPACE=KUBERNETES_NAMESPACE # OPTIONAL

Event subscription setting(Current Datadog support only)

Run

Local

go run *.go -kubeconfig {YOUR_KUBECONFIG_PATH}

Kubernetes

kubectl get po
NAME                                            READY   STATUS    RESTARTS   AGE
kube-job-notifier-deployment-698fbc8b54-ffk2q   1/1     Running   0          8m12s

Install with Helm

helm repo add kube-job-notifier https://yutachaos.github.io/kube-job-notifier/ helm install kube-job-notifier/kube-job-notifier --generate-name