swarm-ui: build authelia/grafana/metrics/logs links from swarm domains
The swarm-controller module builds the Authelia, Grafana, Metrics and Logs quick links from services.hyperhive.swarm.<service>.domain, on the controller's host, instead of each service module adding its entry only on the host that runs it. A controller whose swarm runs those services on other hosts lists them in its /api/links popover. Forge, matrix and bao links are not moved yet: forge waits on #4891, matrix and bao on whether their GUI gate becomes swarm-level. Refs #4885
This commit is contained in:
parent
f63ab954c9
commit
8628e0ecdd
7 changed files with 108 additions and 57 deletions
|
|
@ -104,12 +104,21 @@ opening a popover of links to other swarm-wide services. Backed by
|
|||
`services.hyperhive.swarm.controller.links` (a `listOf { label, icon, url }`,
|
||||
same shape as the per-agent `services.hyperhive.agent.dashboardLinks`).
|
||||
|
||||
Each service's own module contributes its entry when it's enabled on the
|
||||
controller's host — `swarm-authelia.nix`, `hive-matrix.nix`,
|
||||
`hive-forge/default.nix`, `swarm-grafana.nix`, `swarm-victorialogs.nix`, and
|
||||
`swarm-ui.nix` for this UI's own API docs. Adding a link for a new service is
|
||||
a nix-only change to that service's module, or an operator adding an entry
|
||||
directly. An empty list hides the button.
|
||||
Links to swarm services come from swarm-level options, so the list is the
|
||||
same whichever host runs each service:
|
||||
|
||||
| link | URL built from |
|
||||
| -------- | ------------------------------------------------- |
|
||||
| Authelia | `services.hyperhive.swarm.authelia.domain` |
|
||||
| Grafana | `services.hyperhive.swarm.grafana.domain` |
|
||||
| Metrics | `services.hyperhive.swarm.victoriametrics.domain` |
|
||||
| Logs | `services.hyperhive.swarm.victorialogs.domain` |
|
||||
|
||||
`nix/host-modules/swarm-controller.nix` builds these entries. The
|
||||
Matrix and Forge entries, and `swarm-ui.nix`'s entry for this UI's own API
|
||||
docs, come from those services' own modules, and only when the controller's
|
||||
host runs that service. An operator can add entries directly. An
|
||||
empty list hides the button.
|
||||
|
||||
The **Matrix** entry opens the swarm's matrix web client (fluffychat,
|
||||
`services.hyperhive.deploy.matrix.gui.package`) at the homeserver's
|
||||
|
|
|
|||
Loading…
Reference in a new issue