Add felhom-hub: multi-customer dashboard service
- Hub service receives reports from customer controllers - SQLite store with 90-day retention and auto-prune - REST API: POST /api/v1/report, GET /api/v1/customers - Dark theme dashboard with status overview table - Customer detail page with system, storage, containers, backup, health - Bearer token auth for report ingest, bcrypt auth for dashboard - K8s manifest for felhom-system namespace (Deployment, Service, Ingress, PVC) - Dockerfile with multi-stage build Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
# Felhom Hub — Multi-customer dashboard
|
||||
# Dashboard: https://hub.felhom.eu
|
||||
# API: POST /api/v1/report (Bearer token auth)
|
||||
#
|
||||
# Receives health reports from customer controllers and displays
|
||||
# a centralized overview dashboard for the operator (Viktor).
|
||||
#
|
||||
# Namespace: felhom-system (shared with healthchecks and other felhom infra)
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: hub-data
|
||||
namespace: felhom-system
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: hub-config
|
||||
namespace: felhom-system
|
||||
data:
|
||||
hub.yaml: |
|
||||
auth:
|
||||
password_hash: ""
|
||||
api:
|
||||
report_api_key: ""
|
||||
retention:
|
||||
max_days: 90
|
||||
prune_schedule: "04:30"
|
||||
alerting:
|
||||
stale_threshold: "30m"
|
||||
server:
|
||||
listen: ":8080"
|
||||
data_dir: "/data"
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: hub
|
||||
namespace: felhom-system
|
||||
labels:
|
||||
app: hub
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: hub
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: hub
|
||||
spec:
|
||||
containers:
|
||||
- name: hub
|
||||
image: gitea.dooplex.hu/admin/felhom-hub:latest
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "256Mi"
|
||||
cpu: "500m"
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
- name: config
|
||||
mountPath: /etc/felhom-hub
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8080
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: hub-data
|
||||
- name: config
|
||||
configMap:
|
||||
name: hub-config
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: hub
|
||||
namespace: felhom-system
|
||||
spec:
|
||||
selector:
|
||||
app: hub
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: 8080
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: hub
|
||||
namespace: felhom-system
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "2m"
|
||||
spec:
|
||||
ingressClassName: nginx-internal
|
||||
tls:
|
||||
- hosts:
|
||||
- hub.felhom.eu
|
||||
secretName: hub-felhom-eu-tls
|
||||
rules:
|
||||
- host: hub.felhom.eu
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: hub
|
||||
port:
|
||||
number: 8080
|
||||
Reference in New Issue
Block a user