mirror of https://github.com/hashicorp/consul
docs: Document setting dashboard_url on k8s (#10510)
It's tricky because the `{{` needs to be escaped with Helm.pull/10539/head
parent
1b0c9d43e2
commit
fece56f3d8
|
@ -33,6 +33,7 @@ be supported using a new and experimental JavaScript API. See [Custom Metrics
|
||||||
Providers](#custom-metrics-providers).
|
Providers](#custom-metrics-providers).
|
||||||
|
|
||||||
## Kubernetes
|
## Kubernetes
|
||||||
|
|
||||||
If running Consul in Kubernetes, the Helm chart can automatically configure Consul's UI to display topology
|
If running Consul in Kubernetes, the Helm chart can automatically configure Consul's UI to display topology
|
||||||
visualizations. See our [Kubernetes observability docs](/docs/k8s/connect/observability/metrics) for more information.
|
visualizations. See our [Kubernetes observability docs](/docs/k8s/connect/observability/metrics) for more information.
|
||||||
|
|
||||||
|
@ -92,6 +93,9 @@ to the relevant information.
|
||||||
|
|
||||||
An example with Grafana is shown below.
|
An example with Grafana is shown below.
|
||||||
|
|
||||||
|
<Tabs>
|
||||||
|
<Tab heading="HCL">
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
ui_config {
|
ui_config {
|
||||||
enabled = true
|
enabled = true
|
||||||
|
@ -107,6 +111,32 @@ ui_config {
|
||||||
without horizontal scrolling in the example above however this needs to be a
|
without horizontal scrolling in the example above however this needs to be a
|
||||||
normal single-line string value in an HCL configuration file.
|
normal single-line string value in an HCL configuration file.
|
||||||
|
|
||||||
|
</Tab>
|
||||||
|
<Tab heading="Kubernetes YAML">
|
||||||
|
|
||||||
|
On Kubernetes, Consul Server configuration is set in your Helm config via the
|
||||||
|
[`server.extraConfig`](/docs/k8s/helm#v-server-extraconfig) key as JSON:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# The UI is enabled by default so this stanza is not required.
|
||||||
|
ui:
|
||||||
|
enabled: true
|
||||||
|
server:
|
||||||
|
extraConfig: |
|
||||||
|
{
|
||||||
|
"ui_config": {
|
||||||
|
"dashboard_url_templates": {
|
||||||
|
"service": "https://grafana.example.com/d/lDlaj-NGz/service-overview?orgId=1&var-service={{ "{{" }}Service.Name}}&var-namespace={{ "{{" }}Service.Namespace}}&var-dc={{ "{{" }}Datacenter}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
-> **Note**: The `{{` characters in the URL must be escaped using `{{ "{{" }}` so that Helm doesn't try to template them.
|
||||||
|
|
||||||
|
</Tab>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
![Consul UI Service Dashboard Link](/img/ui-dashboard-url-template.png)
|
![Consul UI Service Dashboard Link](/img/ui-dashboard-url-template.png)
|
||||||
|
|
||||||
### Metrics Proxy
|
### Metrics Proxy
|
||||||
|
|
Loading…
Reference in New Issue