From 58c33c8fc95dc5cd3aea8012da781c0ba4ea13b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Mon, 24 Jul 2023 18:37:03 +0200 Subject: [PATCH] Add traefik config --- group_vars/mash_servers | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/group_vars/mash_servers b/group_vars/mash_servers index d3f4070..3d1edfb 100644 --- a/group_vars/mash_servers +++ b/group_vars/mash_servers @@ -2252,6 +2252,18 @@ prometheus_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_ba prometheus_uid: "{{ mash_playbook_uid }}" prometheus_gid: "{{ mash_playbook_gid }}" +# Only enable Traefik labels if a hostname is set (indicating that this will be exposed publicly) +prometheus_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled and prometheus_hostname | length > 0 }}" +prometheus_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}" +prometheus_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}" +prometheus_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}" + +prometheus_container_additional_networks: | + {{ + ([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else []) + }} + + ######################################################################## # # # /prometheus #