Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new value ui.dashboardURLTemplates #937

Merged
merged 3 commits into from
Jan 19, 2022
Merged

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Dec 20, 2021

This value is used to set Consul's ui_config.dashboard_url_templates
config. I'm pulling it out as its own value rather than getting users
to just use server.extraConfig because these template strings always
use the characters {{ and when used within server.extraConfig,
users need to escape those characters.

Before:

server:
  extraConfig: |
    {
      "ui_config": {
        "dashboard_url_templates": {
          "service": "http://grafana/service/{{ "{{" }}Service.Name}}"
        }
      }
    }

Now:

ui:
  dashboardURLTemplates:
    service: "http://grafana/service/{{Service.Name}}"

How I've tested this PR:

  • tests and manual deployment

How I expect reviewers to test this PR:

  • code

Checklist:

  • Tests added
  • CHANGELOG entry added

@lkysow
Copy link
Member Author

lkysow commented Dec 20, 2021

hashicorp/consul-helm#1006 is an issue where this caused problems.

@lkysow lkysow requested review from a team and ishustava and removed request for a team January 10, 2022 18:51
Copy link
Contributor

@ndhanushkodi ndhanushkodi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

This value is used to set Consul's `ui_config.dashboard_url_templates`
config. I'm pulling it out as its own value rather than getting users
to just use `server.extraConfig` because these template strings always
use the characters `{{` and when used within `server.extraConfig`,
users need to escape those characters.

Before:

```yaml
server:
  extraConfig: |
    {
      "ui_config": {
        "dashboard_url_templates": {
          "service": "http://grafana/service/{{ "{{" }}Service.Name}}"
        }
      }
    }
```

Now:

```yaml
ui:
  dashboardURLTemplates:
    service: "http://grafana/service/{{Service.Name}}"
```
@lkysow lkysow force-pushed the lkysow/dashboard-url-templates branch from 35ef418 to 7382b58 Compare January 19, 2022 18:30
@lkysow lkysow merged commit d0d2371 into main Jan 19, 2022
@lkysow lkysow deleted the lkysow/dashboard-url-templates branch January 19, 2022 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants