Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remram44/k8s-emailer
Sends emails when Jobs end based on labels
https://github.com/remram44/k8s-emailer
Last synced: 20 days ago
JSON representation
Sends emails when Jobs end based on labels
- Host: GitHub
- URL: https://github.com/remram44/k8s-emailer
- Owner: remram44
- Created: 2023-11-16T18:30:09.000Z (12 months ago)
- Default Branch: trunk
- Last Pushed: 2023-12-06T18:25:27.000Z (11 months ago)
- Last Synced: 2024-10-11T07:26:59.254Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 54.7 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.
![screenshot of inbox with notification emails](screenshot.png)
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:
# ...
```