storage: Use Authelia for Longhorn UI auth

Instead of using a static username/password and HTTP Basic
authentication for the Longhorn UI, we can now use Authelia via the
*nginx* auth subrequest functionality.
This commit is contained in:
2023-01-13 19:37:14 -06:00
parent 42bc4ae187
commit df12690958
2 changed files with 8 additions and 17 deletions

View File

@@ -23,18 +23,11 @@ kubectl apply -f longhorn.yaml
Expose the Longhorn UI outside the cluster:
```sh
printf 'Longhorn username: '
read longhorn_username
printf 'Longhorn password: '
read -s longhorn_password
printf '%s:%s\n' \
"${longhorn_username}" \
"$(openssl passwd -stdin -apr1 <<< "${longhorn_password}")" \
> auth
kubectl create secret generic -n longhorn-system basic-auth --from-file auth
kubectl apply -f longhorn-ingress.yaml
```
Authentication to the UI is handled by Authelia.
[0]: https://longhorn.io/docs/1.3.0/deploy/install/install-with-kubectl/
[1]: https://longhorn.io/docs/1.3.0/advanced-resources/deploy/node-selector/