chore: minor fix for dashboard utility script

This commit is contained in:
Stefan Reimer 2021-06-30 12:47:50 +02:00
parent 97b94a4ffa
commit 5e9d2bc168

View File

@ -37,7 +37,7 @@ with open(config_file, 'r') as yaml_contents:
configmap = '' configmap = ''
if 'condition' in config: if 'condition' in config:
# use index function to make go template happy if '-' in names # 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('.') tokens = config['condition'].split('.')
configmap = '''{{- if index .Values %(condition)s }} configmap = '''{{- if index .Values %(condition)s }}
''' % {'condition': ' '.join(f'"{w}"' for w in tokens[2:])} ''' % {'condition': ' '.join(f'"{w}"' for w in tokens[2:])}