From 5e9d2bc168f29f17d90eec8e90ef06d91e48cb0a Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Wed, 30 Jun 2021 12:47:50 +0200 Subject: [PATCH] chore: minor fix for dashboard utility script --- charts/kubezero-metrics/sync_grafana_dashboards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/kubezero-metrics/sync_grafana_dashboards.py b/charts/kubezero-metrics/sync_grafana_dashboards.py index 232c0535..22fc8187 100755 --- a/charts/kubezero-metrics/sync_grafana_dashboards.py +++ b/charts/kubezero-metrics/sync_grafana_dashboards.py @@ -37,7 +37,7 @@ with open(config_file, 'r') as yaml_contents: configmap = '' if 'condition' in config: # use index function to make go template happy if '-' in names - if '-' in config['condition']: + if '-' in config['condition'] and "index" not in config['condition']: tokens = config['condition'].split('.') configmap = '''{{- if index .Values %(condition)s }} ''' % {'condition': ' '.join(f'"{w}"' for w in tokens[2:])}