|
591 | 591 | {# Initialize #}
|
592 | 592 | {% set d = {} %}
|
593 | 593 |
|
| 594 | + {# Prepare the secret volume for prometheus username #} |
| 595 | + {% if kiali_vars.external_services.prometheus.auth.username | regex_search('secret:.+:.+') %} |
| 596 | + {% set d = d | combine({'prometheus-username': {'secret_name': kiali_vars.external_services.prometheus.auth.username | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.prometheus.auth.username | regex_replace('secret:.+:(.+)', '\\1') }}) %} |
| 597 | + {% endif %} |
| 598 | +
|
594 | 599 | {# Prepare the secret volume for prometheus password #}
|
595 | 600 | {% if kiali_vars.external_services.prometheus.auth.password | regex_search('secret:.+:.+') %}
|
596 | 601 | {% set d = d | combine({'prometheus-password': {'secret_name': kiali_vars.external_services.prometheus.auth.password | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.prometheus.auth.password | regex_replace('secret:.+:(.+)', '\\1') }}) %}
|
|
601 | 606 | {% set d = d | combine({'prometheus-token': {'secret_name': kiali_vars.external_services.prometheus.auth.token | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.prometheus.auth.token | regex_replace('secret:.+:(.+)', '\\1') }}) %}
|
602 | 607 | {% endif %}
|
603 | 608 |
|
| 609 | + {# Prepare the secret volume for tracing username #} |
| 610 | + {% if kiali_vars.external_services.tracing.enabled|bool == True and kiali_vars.external_services.tracing.auth.username | regex_search('secret:.+:.+') %} |
| 611 | + {% set d = d | combine({'tracing-username': {'secret_name': kiali_vars.external_services.tracing.auth.username | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.tracing.auth.username | regex_replace('secret:.+:(.+)', '\\1') }}) %} |
| 612 | + {% endif %} |
| 613 | +
|
604 | 614 | {# Prepare the secret volume for tracing password #}
|
605 | 615 | {% if kiali_vars.external_services.tracing.enabled|bool == True and kiali_vars.external_services.tracing.auth.password | regex_search('secret:.+:.+') %}
|
606 | 616 | {% set d = d | combine({'tracing-password': {'secret_name': kiali_vars.external_services.tracing.auth.password | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.tracing.auth.password | regex_replace('secret:.+:(.+)', '\\1') }}) %}
|
|
611 | 621 | {% set d = d | combine({'tracing-token': {'secret_name': kiali_vars.external_services.tracing.auth.token | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.tracing.auth.token | regex_replace('secret:.+:(.+)', '\\1') }}) %}
|
612 | 622 | {% endif %}
|
613 | 623 |
|
| 624 | + {# Prepare the secret volume for grafana username #} |
| 625 | + {% if kiali_vars.external_services.grafana.enabled|bool == True and kiali_vars.external_services.grafana.auth.username | regex_search('secret:.+:.+') %} |
| 626 | + {% set d = d | combine({'grafana-username': {'secret_name': kiali_vars.external_services.grafana.auth.username | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.grafana.auth.username | regex_replace('secret:.+:(.+)', '\\1') }}) %} |
| 627 | + {% endif %} |
| 628 | +
|
614 | 629 | {# Prepare the secret volume for grafana password #}
|
615 | 630 | {% if kiali_vars.external_services.grafana.enabled|bool == True and kiali_vars.external_services.grafana.auth.password | regex_search('secret:.+:.+') %}
|
616 | 631 | {% set d = d | combine({'grafana-password': {'secret_name': kiali_vars.external_services.grafana.auth.password | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.grafana.auth.password | regex_replace('secret:.+:(.+)', '\\1') }}) %}
|
|
626 | 641 | {% set d = d | combine({'login-token-signing-key': {'secret_name': kiali_vars.login_token.signing_key | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.login_token.signing_key | regex_replace('secret:.+:(.+)', '\\1') }}) %}
|
627 | 642 | {% endif %}
|
628 | 643 |
|
| 644 | + {# Prepare the secret volume for customdashboards prometheus username #} |
| 645 | + {% if kiali_vars.external_services.custom_dashboards.prometheus.auth.username | regex_search('secret:.+:.+') %} |
| 646 | + {% set d = d | combine({'customdashboards-prometheus-username': {'secret_name': kiali_vars.external_services.custom_dashboards.prometheus.auth.username | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.custom_dashboards.prometheus.auth.username | regex_replace('secret:.+:(.+)', '\\1') }}) %} |
| 647 | + {% endif %} |
| 648 | +
|
| 649 | + {# Prepare the secret volume for customdashboards prometheus password #} |
| 650 | + {% if kiali_vars.external_services.custom_dashboards.prometheus.auth.password | regex_search('secret:.+:.+') %} |
| 651 | + {% set d = d | combine({'customdashboards-prometheus-password': {'secret_name': kiali_vars.external_services.custom_dashboards.prometheus.auth.password | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.custom_dashboards.prometheus.auth.password | regex_replace('secret:.+:(.+)', '\\1') }}) %} |
| 652 | + {% endif %} |
| 653 | +
|
| 654 | + {# Prepare the secret volume for customdashboards prometheus token #} |
| 655 | + {% if kiali_vars.external_services.custom_dashboards.prometheus.auth.token | regex_search('secret:.+:.+') %} |
| 656 | + {% set d = d | combine({'customdashboards-prometheus-token': {'secret_name': kiali_vars.external_services.custom_dashboards.prometheus.auth.token | regex_replace('secret:(.+):.+', '\\1'), 'secret_key': kiali_vars.external_services.custom_dashboards.prometheus.auth.token | regex_replace('secret:.+:(.+)', '\\1') }}) %} |
| 657 | + {% endif %} |
| 658 | +
|
629 | 659 | {# Set the yaml to the new dict #}
|
630 | 660 | {{ d | to_nice_yaml }}
|
631 | 661 | set_fact:
|
|
0 commit comments