https://github.com/remram44/k8s-emailer
Sends emails when Jobs end based on labels
https://github.com/remram44/k8s-emailer
job kubernetes notification
Last synced: 5 months ago
JSON representation
Sends emails when Jobs end based on labels
- Host: GitHub
- URL: https://github.com/remram44/k8s-emailer
- Owner: remram44
- License: mit
- Created: 2023-11-16T18:30:09.000Z (over 1 year ago)
- Default Branch: trunk
- Last Pushed: 2024-12-18T16:41:49.000Z (7 months ago)
- Last Synced: 2025-02-05T07:06:59.661Z (5 months ago)
- Topics: job, kubernetes, notification
- Language: Python
- Homepage:
- Size: 56.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kubernetes emailer
This is a simple controller that watches your Jobs and sends an email when they complete or fail. It is meant to offer similar functionality to what typical batch schedulers provide, for example SLURM.

It is available as a Helm Chart which should make it easy to install anywhere:
```console
helm install \
k8s-emailer \
oci://ghcr.io/remram44/k8s-emailer/helm-charts/k8s-emailer \
--version 0.1.3 \
--namespace kube-system \
--set emailTag=MY-ORG-CLUSTER \
--set emailServer.host=smtp.example.org \
--set [email protected]
```Then users can annotate their jobs to receive emails automatically:
```yaml
apiVersion: batch/v1
kind: Job
metadata:
labels:
k8s-emailer.hpc.nyu.edu/mode: "all"
# "all": email for all status changes (succeeds, fails, restarts)
# "failure": email on failure (not success)
# "complete": email or failure or success
annotations:
k8s-emailer.hpc.nyu.edu/addresses: "[email protected], [email protected]"
# ...
spec:
# ...
```