Skip to content

feat(adguard/beelink): add API IngressRoute without Authentik for Homepage widget#1788

Open
ixxeL2097 wants to merge 2 commits into
mainfrom
feat/adguard-beelink-api-ingressroute
Open

feat(adguard/beelink): add API IngressRoute without Authentik for Homepage widget#1788
ixxeL2097 wants to merge 2 commits into
mainfrom
feat/adguard-beelink-api-ingressroute

Conversation

@ixxeL2097

Copy link
Copy Markdown
Member

Problem

Homepage runs on genmachine and requests AdGuard stats from the beelink k0s cluster. The external URL adguard.k0s-fullstack.fredcorp.com is behind the Authentik forwardAuth middleware — the widget receives the Authentik HTML login page instead of AdGuard JSON:

API Error: Invalid data
URL: https://adguard.k0s-fullstack.fredcorp.com/control/stats
Response Data: <!DOCTYPE html>... authentik ...

Cross-cluster internal service URLs (adguard-adguard-home-http.adguard.svc.cluster.local) are not reachable from genmachine — different clusters, different Kubernetes networks.

Solution

New hostname adguard-api.k0s-fullstack.fredcorp.com with a dedicated IngressRoute that has no Authentik middleware. AdGuard's own HTTP basic auth handles access control (sa-homepage / password from Vault adguard/creds).

DNS

The wildcard rewrite *.k0s-fullstack.fredcorp.com → 192.168.1.191 (beelink Traefik LoadBalancer IP) already exists in both AdGuard instances (beelink and genmachine). No DNS changes required.

Changes

File Change
adguard/beelink/templates/ingressroute-homepage.yaml New: Certificate + IngressRoute for adguard-api.k0s-fullstack.fredcorp.com, no middlewares
homepage/genmachine/templates/config.yaml Widget URL: adguard.k0s-fullstack.fredcorp.comadguard-api.k0s-fullstack.fredcorp.com

Pre-requisite

sa-homepage user must exist in beelink AdGuard (Settings → Users) with the password stored at Vault adguard/creds (same secret used by the genmachine AdGuard widget).

🤖 Generated with Claude Code

ixxeL2097 and others added 2 commits May 14, 2026 17:05
…epage widget

Homepage runs on genmachine and cannot use k0s internal service URLs
(different clusters). The external URL adguard.k0s-fullstack.fredcorp.com
is behind Authentik forwardAuth which returns the login HTML page instead
of AdGuard JSON stats.

Solution: dedicated IngressRoute on adguard-api.k0s-fullstack.fredcorp.com
without Authentik middleware. AdGuard's own basic auth handles access control.
DNS wildcard *.k0s-fullstack.fredcorp.com -> 192.168.1.191 already covers
the new hostname (no DNS change needed).

- adguard/beelink/templates/ingressroute-homepage.yaml: Certificate +
  IngressRoute for adguard-api.k0s-fullstack.fredcorp.com routing to
  adguard-adguard-home-http:80 with no middlewares
- homepage config: widget url -> adguard-api.k0s-fullstack.fredcorp.com

Pre-requisite: sa-homepage user must exist in beelink AdGuard with
the password stored at Vault adguard/creds (same as genmachine AdGuard).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…API endpoint

IngressRoute (Traefik CRD) was inconsistent with the existing beelink
AdGuard pattern which uses standard Kubernetes Ingress objects. Standard
Ingress with cert-manager annotations is simpler: no separate Certificate
resource needed, cert-manager handles TLS automatically, one resource
instead of two.

No Authentik middleware annotation = no Authentik interception.
AdGuard basic auth remains the access control layer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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