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 support for configuring feature_toggles in grafana role #173

Merged
merged 5 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
| `grafana_snapshots` | {} | [snapshots](http://docs.grafana.org/installation/configuration/#snapshots) configuration section |
| `grafana_image_storage` | {} | [image storage](http://docs.grafana.org/installation/configuration/#external-image-storage) configuration section |
| `grafana_date_formats` | {} | [date formats](http://docs.grafana.org/installation/configuration/#date_formats) configuration section |
| `grafana_feature_toggles` | {} | [feature toggles](http://docs.grafana.org/installation/configuration/#feature_toggles) configuration section |
| `grafana_dashboards` | [] | List of dashboards which should be imported |
| `grafana_dashboards_dir` | "dashboards" | Path to a local directory containing dashboards files in `json` format |
| `grafana_datasources` | [] | List of datasources which should be configured |
Expand Down
6 changes: 6 additions & 0 deletions roles/grafana/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ grafana_date_formats: {}
# use_browser_locale: true
# default_timezone: "browser"

# Feature toggles
# List of feature toggles: https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/feature-toggles/#feature-toggles
grafana_feature_toggles: {}
# autoMigrateOldPanels: true
# regressionTransformation: true

#######
# Plugins from https://grafana.com/plugins
grafana_plugins: []
Expand Down
8 changes: 8 additions & 0 deletions roles/grafana/templates/grafana.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ provider = {{ grafana_image_storage.provider }}
{% endfor %}
{% endif %}

{% if grafana_feature_toggles != {} %}
# Feature toggles
[feature_toggles]
{% for k,v in grafana_feature_toggles.items() %}
{{ k }} = {{ v }}
{% endfor %}
{% endif %}

# Oauth_Keycloack
{% if grafana_auth_generic_oauth != {} %}
[auth.generic_oauth]
Expand Down
Loading