Skip to content

feat(kuvasz): replace Uptime Kuma with Kuvasz behind auth.polinetwork.org - #33

Merged
lorenzocorallo merged 1 commit into
mainfrom
feat/kuvasz
Nov 10, 2026
Merged

lorenzocorallo merged 1 commit into
mainfrom
feat/kuvasz

Conversation

@lorenzocorallo

Copy link
Copy Markdown
Member

Replaces Uptime Kuma with Kuvasz 4.7.0, signed in through auth.polinetwork.org and restricted to it-member.

Access

  • Kuvasz uses its built-in OIDC (client Kuvasz); with OIDC on, its username/password form is disabled.
  • Kuvasz cannot check roles or groups. An oauth2-proxy gate (client Kuvasz access gate, polinetwork:identity scope) guards /oauth/*, Kuvasz's only sign-in routes, through a Traefik forwardAuth and admits only groups ∋ it-member. The IdP expands inherited roles into groups, so it-lead is admitted too. Without the gate cookie nobody completes a Kuvasz sign-in.
  • Anonymous by design: public status pages, /public assets, push heartbeats and /api/v2/health. The API needs a Kuvasz session or API key.
  • A forwarded-https middleware forces X-Forwarded-Proto: https, because Traefik does not trust cloudflared's headers and Kuvasz/oauth2-proxy build redirect URIs from them.
  • Kuvasz sessions last 8h (AUTH_MAX_AGE), the gate session 15m.

Monitors

  • Defined in apps/kuvasz/kuvasz.yml: 11 HTTP and 2 TCP (PostgreSQL, Redis), plus the in-cluster backend.
  • status.polinetwork.org redirects to the public page /status/polinetwork, which lists public services only. The default page includes internal monitors and requires sign-in.

Other changes

  • The backend NetworkPolicy admits kuvasz instead of uptime-kuma.
  • kv-pn-apps now allows the kuvasz namespace.
  • The Uptime Kuma SQLite backup is removed. Kuvasz data lives in PostgreSQL and is covered by pg_dumpall. The backup change takes effect at the next Ansible run.
  • Uptime Kuma's namespace and PVC have prune disabled and stay in the cluster for rollback.

Checks

  • Locally: Kuvasz + PostgreSQL + oauth2-proxy + Traefik v3 with the same middlewares.
    • Unauthenticated /oauth/login and /oauth/callback redirect to the gate's IdP sign-in.
    • The redirect URIs are https.
    • Path variants (case, //, .., ;) don't reach Kuvasz's login route.
    • The public status page and heartbeats work.
    • Form login returns 404.
  • diagnose_application accepts both authorization requests.
  • kubeconform: 15/15 valid. Repo tests pass.

Setup done outside the repo

  • Both OIDC clients were created on the IdP.
  • The kuvasz-* secrets are in kv-pn-apps.
  • The kuvasz database and role are created after merge, from the synced Secret.

….org

Kuvasz signs in through auth.polinetwork.org. It cannot check roles, so an
oauth2-proxy gate in front of its /oauth sign-in routes admits only it-member
(the groups claim carries inherited roles, so it-lead too). Public status
pages, assets and push heartbeats stay anonymous.

Monitors and status pages live in apps/kuvasz/kuvasz.yml. status.polinetwork.org
serves the public page; the default page with internal monitors is private.
Uptime Kuma's PVC and namespace are kept (prune disabled) for rollback.
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change replaces the Uptime Kuma deployment with Kuvasz. It adds Kuvasz monitoring configuration, a PostgreSQL-backed deployment, an OIDC gate, Traefik routes, and network policies. It updates Flux and secret access, changes backend access selectors, and removes Uptime Kuma backup handling and manifests.

Changes

Monitoring service migration

Layer / File(s) Summary
Register Kuvasz and configure secrets
clusters/k3s/apps/kustomization.yaml, clusters/k3s/apps/kuvasz.yaml, apps/kuvasz/namespace.yaml, infrastructure/secret-stores/cluster-secret-stores.yaml, apps/kuvasz/external-secret.yaml
Flux now targets the Kuvasz namespace and path. The namespace is allowed to use kv-pn-apps, and an ExternalSecret maps database and OIDC credentials.
Configure and deploy Kuvasz
apps/kuvasz/kuvasz.yml, apps/kuvasz/deployment-kuvasz.yaml, apps/kuvasz/kustomization.yaml
The configuration defines HTTP and TCP monitors and private and public status pages. A Service and Deployment run Kuvasz with database and OIDC settings. Kustomize includes the resources and generates the configuration ConfigMap.
Add authentication and ingress routes
apps/kuvasz/deployment-gate.yaml, apps/kuvasz/middleware.yaml, apps/kuvasz/ingress.yaml, apps/kuvasz/network-policy.yaml
An oauth2-proxy gate, Traefik middlewares, and Ingress resources provide OIDC authentication and uptime and status routes. A NetworkPolicy limits access to Kuvasz and the gate to Traefik pods.
Update backend access and remove Uptime Kuma
apps/backend/network-policy.yaml, ansible/roles/backup/templates/k3s-application-backup.service.j2, ansible/roles/backup/templates/k3s-application-backup.sh.j2, apps/uptime-kuma/*
The backend ingress allowlist selects Kuvasz. Backup handling no longer includes the Uptime Kuma volume or database, and the old Uptime Kuma manifests are removed.

Change: Feature

Merge Risk: Minimal · up to b9b5b

The change swaps Uptime Kuma for Kuvasz behind an OIDC gate. No actionable merge-blocking issue was found. Operators still need to complete the out-of-repo setup, namely the secrets and the post-merge database creation.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly identifies the main change: replacing Uptime Kuma with Kuvasz. It also describes the authentication integration, which is part of the change.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (14 skipped: 14 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Checkov (3.3.30)

apps/kuvasz/kustomization.yaml

Checkov temporarily skipped this Kustomization; rendered manifests were not scanned

clusters/k3s/apps/kustomization.yaml

Checkov temporarily skipped this Kustomization; rendered manifests were not scanned

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e26cefaf-9e81-4e70-a015-8bbe39ecc709
Commits

Reviewing files that changed from the base of the PR and between abb661e and b9b5b71.

Files selected for processing: 18

  • ansible/roles/backup/templates/k3s-application-backup.service.j2
  • ansible/roles/backup/templates/k3s-application-backup.sh.j2
  • apps/backend/network-policy.yaml
  • apps/kuvasz/deployment-gate.yaml
  • apps/kuvasz/deployment-kuvasz.yaml
  • apps/kuvasz/external-secret.yaml
  • apps/kuvasz/ingress.yaml
  • apps/kuvasz/kustomization.yaml
  • apps/kuvasz/kuvasz.yml
  • apps/kuvasz/middleware.yaml
  • apps/kuvasz/namespace.yaml
  • apps/kuvasz/network-policy.yaml
  • apps/uptime-kuma/deployment.yaml
  • apps/uptime-kuma/ingress.yaml
  • apps/uptime-kuma/kustomization.yaml
  • clusters/k3s/apps/kustomization.yaml
  • clusters/k3s/apps/kuvasz.yaml
  • infrastructure/secret-stores/cluster-secret-stores.yaml
Files with no reviewable changes: 4

  • apps/uptime-kuma/deployment.yaml
  • ansible/roles/backup/templates/k3s-application-backup.sh.j2
  • apps/uptime-kuma/ingress.yaml
  • apps/uptime-kuma/kustomization.yaml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@lorenzocorallo
lorenzocorallo merged commit cd01456 into main Nov 10, 2026
2 checks passed
@lorenzocorallo
lorenzocorallo deleted the feat/kuvasz branch November 10, 2026 11:41
toto04 added a commit that referenced this pull request Nov 10, 2026
Main replaced Uptime Kuma with Kuvasz (#33), so this PR keeps only the
SSO gateway framework. The Uptime Kuma Middleware, Ingress split and
NetworkPolicy go away with the app; the README now carries the Middleware
template, and the tests check every app Middleware that calls the gateway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant