Transforms the generic Flux provider output to fit with NTFY
- Python 49%
- Smarty 39.1%
- Dockerfile 11.9%
| .forgejo/workflows | ||
| chart/flux-ntfy-transformer | ||
| src/flux_ntfy_transformer | ||
| .gitignore | ||
| .python-version | ||
| Dockerfile | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
flux-ntfy-transformer
Transform Flux webhook events into Ntfy notifications.
Overview
This is a simple webhook transformer that receives events from Flux's notification controller and forwards them to an Ntfy server with proper formatting.
Development
# Install dependencies
uv sync
# Run locally
uv run flask --app flux_ntfy_transformer run --port 8080
# Or with gunicorn
uv run gunicorn -b 0.0.0.0:8080 flux_ntfy_transformer:app
Configuration
Environment variables:
| Variable | Description | Default |
|---|---|---|
NTFY_URL |
Base URL of your Ntfy instance | (required) |
NTFY_TOPIC |
Topic to send notifications to | flux |
NTFY_TOKEN |
Bearer token for authentication | (optional) |
Docker
# Build
docker build -t flux-ntfy-transformer .
# Run
docker run -p 8080:8080 \
-e NTFY_URL=https://ntfy.sh \
-e NTFY_TOPIC=my-flux-topic \
flux-ntfy-transformer
Helm
helm install flux-ntfy-transformer ./chart/flux-ntfy-transformer \
--namespace flux-system \
--set ntfy.url=https://your-ntfy-instance \
--set ntfy.topic=flux
The chart can optionally create the Flux Provider and Alert resources for you.
How it works
- Flux sends a webhook event to
/webhook - The transformer extracts relevant fields (kind, name, namespace, message, severity)
- Maps severity to Ntfy priority and tags
- Forwards to Ntfy with proper headers
Severity mapping
| Flux Severity | Ntfy Priority | Ntfy Tag |
|---|---|---|
info |
default |
✅ |
error |
high |
❌ |