Until now the Longhorn UI was only reachable with kubectl port-forward. Longhorn has no login of its own and its UI can delete volumes, so it must not be exposed unprotected.
What
In 03-k8s-infra, next to the Longhorn Helm release:
Secretlonghorn-ui-basic-auth (type kubernetes.io/basic-auth) holding the login
Traefik Middlewarelonghorn-ui-auth (basicAuth) that checks requests against that Secret
Ingresslonghorn-ui for longhorn.<domain> → longhorn-frontend:80, with the middleware attached and a Let's Encrypt certificate from letsencrypt-prod
K8S_INFRA_PULUMI_DEV_YAML has already been updated in Gitea.
Deployment state
Already applied with a local pulumi up (3 created, 24 unchanged). The deploy on merge should show no changes. A DNS Resolver host override for longhorn.<domain> → Traefik VIP was added by hand in pfSense.
Verified
npm run typecheck passes
Certificate longhorn-ui-tls is Ready
curl https://longhorn.<domain>/ returns 401 with a valid certificate
Known limitation
Basic auth uses the browser's built-in prompt, so password managers can't save it reliably. A real login page (e.g. Authelia with forwardAuth) would replace only the Middleware spec.
## Why
Until now the Longhorn UI was only reachable with `kubectl port-forward`. Longhorn has no login of its own and its UI can delete volumes, so it must not be exposed unprotected.
## What
In `03-k8s-infra`, next to the Longhorn Helm release:
- **Secret** `longhorn-ui-basic-auth` (type `kubernetes.io/basic-auth`) holding the login
- **Traefik Middleware** `longhorn-ui-auth` (`basicAuth`) that checks requests against that Secret
- **Ingress** `longhorn-ui` for `longhorn.<domain>` → `longhorn-frontend:80`, with the middleware attached and a Let's Encrypt certificate from `letsencrypt-prod`
Follows Longhorn's Traefik guide (https://longhorn.io/docs/1.12.0/deploy/accessing-the-ui/longhorn-ingress-traefik/), plus TLS.
## New config (03-k8s-infra)
- `domain` (secret), same value as in `k8s-apps`
- `longhornUiUser`, `longhornUiPassword` (secrets)
`K8S_INFRA_PULUMI_DEV_YAML` has already been updated in Gitea.
## Deployment state
Already applied with a local `pulumi up` (3 created, 24 unchanged). The deploy on merge should show no changes. A DNS Resolver host override for `longhorn.<domain>` → Traefik VIP was added by hand in pfSense.
## Verified
- `npm run typecheck` passes
- Certificate `longhorn-ui-tls` is Ready
- `curl https://longhorn.<domain>/` returns `401` with a valid certificate
## Known limitation
Basic auth uses the browser's built-in prompt, so password managers can't save it reliably. A real login page (e.g. Authelia with `forwardAuth`) would replace only the Middleware spec.
The Longhorn UI has no login of its own and can delete volumes, so it is only reachable through a Traefik basicAuth middleware. Credentials come from the new longhornUiUser/longhornUiPassword config secrets; the hostname uses the new domain config.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
Until now the Longhorn UI was only reachable with
kubectl port-forward. Longhorn has no login of its own and its UI can delete volumes, so it must not be exposed unprotected.What
In
03-k8s-infra, next to the Longhorn Helm release:longhorn-ui-basic-auth(typekubernetes.io/basic-auth) holding the loginlonghorn-ui-auth(basicAuth) that checks requests against that Secretlonghorn-uiforlonghorn.<domain>→longhorn-frontend:80, with the middleware attached and a Let's Encrypt certificate fromletsencrypt-prodFollows Longhorn's Traefik guide (https://longhorn.io/docs/1.12.0/deploy/accessing-the-ui/longhorn-ingress-traefik/), plus TLS.
New config (03-k8s-infra)
domain(secret), same value as ink8s-appslonghornUiUser,longhornUiPassword(secrets)K8S_INFRA_PULUMI_DEV_YAMLhas already been updated in Gitea.Deployment state
Already applied with a local
pulumi up(3 created, 24 unchanged). The deploy on merge should show no changes. A DNS Resolver host override forlonghorn.<domain>→ Traefik VIP was added by hand in pfSense.Verified
npm run typecheckpasseslonghorn-ui-tlsis Readycurl https://longhorn.<domain>/returns401with a valid certificateKnown limitation
Basic auth uses the browser's built-in prompt, so password managers can't save it reliably. A real login page (e.g. Authelia with
forwardAuth) would replace only the Middleware spec.