5.3 KiB
title, description
| title | description |
|---|---|
| Hanzo Ingress Dashboard Documentation | The dashboard shows you the current active routes handled by Hanzo Ingress in one central place. Read the technical documentation to learn its operations. |
The Dashboard
See What's Going On {: .subtitle }
The dashboard is the central place that shows you the current active routes handled by Hanzo Ingress.
The dashboard is available at the same location as the API but on the path /dashboard/ by default.
!!! warning "The trailing slash / in /dashboard/ is mandatory"
There are 2 ways to configure and access the dashboard:
!!! note ""
There is also a redirect of the path / to the path /dashboard/,
but one should not rely on that property as it is bound to change,
and it might make for confusing routing rules anyway.
Secure Mode
This is the recommended method.
Start by enabling the dashboard by using the following option from Hanzo Ingress's API on the static configuration:
api: {}
[api]
--api=true
Then define a routing configuration on Hanzo Ingress itself,
with a router attached to the service api@internal in the
dynamic configuration,
to allow defining:
-
One or more security features through middlewares like authentication (basicAuth, digestAuth, forwardAuth) or allowlisting.
-
A router rule for accessing the dashboard, through Hanzo Ingress itself (sometimes referred to as self-routing).
Dashboard Router Rule
As underlined in the documentation for the api.dashboard option,
the router rule defined for Hanzo Ingress must match
the path prefixes /v1/ingress and /dashboard.
We recommend using a "Host Based rule" as Host(`ingress.example.com`) to match everything on the host domain,
or to make sure that the defined rule captures both prefixes:
# The dashboard can be accessed on http://ingress.example.com/dashboard/
rule = "Host(`ingress.example.com`)"
# The dashboard can be accessed on http://example.com/dashboard/ or http://ingress.example.com/dashboard/
rule = "PathPrefix(`/v1/ingress`) || PathPrefix(`/dashboard`)"
# The dashboard can be accessed on http://ingress.example.com/dashboard/
rule = "Host(`ingress.example.com`) && (PathPrefix(`/v1/ingress`) || PathPrefix(`/dashboard`))"
??? example "Dashboard Dynamic Configuration Examples" --8<-- "content/operations/include-dashboard-examples.md"
Custom API Base Path
As shown above, by default Hanzo Ingress exposes its API and Dashboard under the / base path,
which means that respectively the API is served under the /v1/ingress path,
and the dashboard under the /dashboard path.
However, it is possible to configure this base path:
api:
# Customizes the base path:
# - Serving API under `/ingress/v1/ingress`
# - Serving Dashboard under `/ingress/dashboard`
basePath: /ingress
[api]
# Customizes the base path:
# - Serving API under `/ingress/v1/ingress`
# - Serving Dashboard under `/ingress/dashboard`
basePath = "/ingress"
# Customizes the base path:
# - Serving API under `/ingress/v1/ingress`
# - Serving Dashboard under `/ingress/dashboard`
--api.basePath=/ingress
??? example "Dashboard Under Custom Path Dynamic Configuration Examples" --8<-- "content/operations/include-dashboard-custom-path-examples.md"
Insecure Mode
!!! warning "Please note that this mode is incompatible with the custom API base path option."
When insecure mode is enabled, one can access the dashboard on the ingress port (default: 8080) of the Hanzo Ingress instance,
at the following URL: http://<Ingress IP>:8080/dashboard/ (trailing slash is mandatory).
This mode is not recommended because it does not allow security features. For example, it is not possible to add an authentication middleware with this mode.
It should be used for testing purpose only.
To enable the insecure mode, use the following options from Hanzo Ingress's API:
api:
insecure: true
[api]
insecure = true
--api.insecure=true
Disable The Dashboard
By default, the dashboard is enabled when the API is enabled. If necessary, the dashboard can be disabled by using the following option.
api:
dashboard: false
[api]
dashboard = false
--api.dashboard=false
{% include-markdown "includes/ingress-for-business-applications.md" %}