hashicorp/consul

Allow ${ } style interpolation for UI dashboard template URLs

Open

#11,321 opened on 2021年10月14日

GitHub で見る
 (4 comments) (0 reactions) (1 assignee)Go (29,891 stars) (4,588 forks)batch import
Hacktoberfestgood first issuetheme/operator-usabilitytheme/uitype/enhancement

説明

Feature Description

The ui_config.dashboard_url_templates config option supports specifying URL templates that can be used to render links to external dashboards in various contexts in the UI.

The field currently supports {{ }} interpolation for placeholders such as Service.Name and Datacenter.

Unfortunately, when specifying this configuration from within a Helm chart, Helm's own {{ }} interpolation conflicts with the interpolation for this field. The only way around that conflict is to escape the interpolation characters (so they are skipped by Helm, but caught by the Consul UI). This is confusing and error-prone.

To solve that, we want to add a second interpolation format: ${ }, so that the results of the following would be equivalent:

some-url-{{ Datacenter }} => some-url-dc1
some-url-${ Datacenter }  => some-url-dc1

This task includes:

For context, the render-template helper is used in the two places below, but that shouldn't matter assuming test cases are added to render-template-test.js:

Use Case(s)

Specifying ui_config.dashboard_url_templates from a Helm chart without needing to escape characters.

コントリビューターガイド

Allow ${ } style interpolation for UI dashboard template URLs · hashicorp/consul#11321 | Good First Issue