2024-01-12 10:15:40 +00:00
|
|
|
{% if matrix_synapse_worker_container_labels_traefik_enabled %}
|
|
|
|
traefik.enable=true
|
|
|
|
|
|
|
|
{% if matrix_synapse_worker_container_labels_traefik_docker_network %}
|
|
|
|
traefik.docker.network={{ matrix_synapse_worker_container_labels_traefik_docker_network }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.services.{{ matrix_synapse_worker_container_name }}-metrics.loadbalancer.server.port={{ matrix_synapse_worker_details.metrics_port }}
|
|
|
|
|
|
|
|
{#
|
|
|
|
Metrics (e.g. /metrics/synapse/__WORKER_ID__)
|
|
|
|
#}
|
2024-01-14 08:29:38 +00:00
|
|
|
{% if matrix_synapse_worker_container_labels_public_metrics_enabled %}
|
2024-01-12 10:15:40 +00:00
|
|
|
|
|
|
|
{% set metrics_middlewares = [] %}
|
|
|
|
|
2024-01-14 08:29:38 +00:00
|
|
|
{% if matrix_synapse_worker_container_labels_public_metrics_middleware_basic_auth_enabled %}
|
2024-01-12 10:15:40 +00:00
|
|
|
{% set metrics_middlewares = metrics_middlewares + [matrix_synapse_worker_container_name + '-metrics-basic-auth'] %}
|
2024-01-14 08:29:38 +00:00
|
|
|
traefik.http.middlewares.{{ matrix_synapse_worker_container_name }}-metrics-basic-auth.basicauth.users={{ matrix_synapse_worker_container_labels_public_metrics_middleware_basic_auth_users }}
|
2024-01-12 10:15:40 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% set metrics_middlewares = metrics_middlewares + [matrix_synapse_worker_container_name + '-metrics-replacepath'] %}
|
|
|
|
traefik.http.middlewares.{{ matrix_synapse_worker_container_name }}-metrics-replacepath.replacepath.path=/_synapse/metrics
|
|
|
|
|
2024-01-14 08:29:38 +00:00
|
|
|
traefik.http.routers.{{ matrix_synapse_worker_container_name }}-metrics.rule={{ matrix_synapse_worker_container_labels_public_metrics_traefik_rule | replace('__WORKER_ID__', matrix_synapse_worker_details.id) }}
|
2024-01-12 10:15:40 +00:00
|
|
|
|
|
|
|
{% if metrics_middlewares | length > 0 %}
|
|
|
|
traefik.http.routers.{{ matrix_synapse_worker_container_name }}-metrics.middlewares={{ metrics_middlewares | join(',') }}
|
|
|
|
{% endif %}
|
|
|
|
|
2024-01-14 08:29:38 +00:00
|
|
|
{% if matrix_synapse_worker_container_labels_public_metrics_traefik_priority | int > 0 %}
|
|
|
|
traefik.http.routers.{{ matrix_synapse_worker_container_name }}-metrics.priority={{ matrix_synapse_worker_container_labels_public_metrics_traefik_priority }}
|
2024-01-12 10:15:40 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
traefik.http.routers.{{ matrix_synapse_worker_container_name }}-metrics.service={{ matrix_synapse_worker_container_name }}-metrics
|
2024-01-14 08:29:38 +00:00
|
|
|
traefik.http.routers.{{ matrix_synapse_worker_container_name }}-metrics.entrypoints={{ matrix_synapse_worker_container_labels_public_metrics_traefik_entrypoints }}
|
2024-01-12 10:15:40 +00:00
|
|
|
|
2024-01-14 08:29:38 +00:00
|
|
|
traefik.http.routers.{{ matrix_synapse_worker_container_name }}-metrics.tls={{ matrix_synapse_worker_container_labels_public_metrics_traefik_tls | to_json }}
|
|
|
|
{% if matrix_synapse_worker_container_labels_public_metrics_traefik_tls %}
|
|
|
|
traefik.http.routers.{{ matrix_synapse_worker_container_name }}-metrics.tls.certResolver={{ matrix_synapse_worker_container_labels_public_metrics_traefik_tls_certResolver }}
|
2024-01-12 10:15:40 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
{#
|
|
|
|
/Metrics (e.g. /metrics/synapse/__WORKER_ID__)
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{{ matrix_synapse_worker_container_labels_additional_labels }}
|