4c8bf63ce3
New "Configurations" section lets operators pre-configure customer settings
in the Hub, then docker-setup.sh can download a ready-made controller.yaml
using just a customer ID and retrieval password.
- Store: customer_configs table with CRUD + per-customer API key lookup
- API: GET /api/v1/config/{id} with X-Retrieval-Password auth
- Auth: per-customer API keys alongside existing global key (backward compatible)
- Web UI: /configs list, create, edit, delete, YAML preview, copy-to-clipboard
- YAML gen: deep-merge controller.yaml.example template with customer overrides
- Template fetcher: background goroutine refreshing template from Gitea repo
- Navigation: Dashboard / Configurations tabs on all pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
# =============================================================================
|
|
# Felhom Hub Configuration
|
|
# =============================================================================
|
|
# Location: /etc/felhom-hub/hub.yaml (or mount as ConfigMap in k8s)
|
|
#
|
|
# The hub receives health reports from customer controllers and serves
|
|
# a multi-customer overview dashboard for the operator.
|
|
# =============================================================================
|
|
|
|
# --- Authentication ---
|
|
auth:
|
|
# Bcrypt hash for dashboard login (Viktor only)
|
|
password_hash: ""
|
|
|
|
# --- API ---
|
|
api:
|
|
# Bearer token required for report ingest (POST /api/v1/report)
|
|
report_api_key: ""
|
|
|
|
# --- Notifications ---
|
|
notifications:
|
|
resend_api_key: "" # Resend.com API key for sending notification emails
|
|
from_email: "monitoring@felhom.eu" # Sender address for notification emails
|
|
|
|
# --- Data retention ---
|
|
retention:
|
|
max_days: 90 # Keep 90 days of report history
|
|
prune_schedule: "04:30" # Daily prune time (Europe/Budapest)
|
|
|
|
# --- Alerting thresholds ---
|
|
alerting:
|
|
stale_threshold: "30m" # Customer considered stale if no report for this duration
|
|
|
|
# --- Registry / template fetching ---
|
|
registry:
|
|
image: "gitea.dooplex.hu/admin/felhom-controller"
|
|
username: "" # Gitea username (for version check + template fetch)
|
|
token: "" # Gitea token
|
|
check_interval: "6h" # How often to check for new controller versions
|
|
template_interval: "1h" # How often to fetch controller.yaml.example for config generation
|
|
|
|
# --- Server ---
|
|
server:
|
|
listen: ":8080"
|
|
data_dir: "/data" # SQLite database location
|