From f9faaae26c74db137a1d94d0b0a81ef3f27e153b Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 11 Jan 2024 12:33:05 +0200 Subject: [PATCH] Shorten Traefik router name (*-well-known-endpoint -> *-well-known) --- .../matrix-static-files/templates/labels.j2 | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/custom/matrix-static-files/templates/labels.j2 b/roles/custom/matrix-static-files/templates/labels.j2 index 2d0da52da..ede33ce4b 100644 --- a/roles/custom/matrix-static-files/templates/labels.j2 +++ b/roles/custom/matrix-static-files/templates/labels.j2 @@ -16,27 +16,27 @@ traefik.http.services.{{ matrix_static_files_identifier }}.loadbalancer.server.p {% set well_known_matrix_endpoint_middlewares = [] %} {% if matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_enabled %} -traefik.http.middlewares.{{ matrix_static_files_identifier }}-well-known-endpoint-compress.compress=true -traefik.http.middlewares.{{ matrix_static_files_identifier }}-well-known-endpoint-compress.compress.minResponseBodyBytes={{ matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_minResponseBodyBytes }} -{% set well_known_matrix_endpoint_middlewares = well_known_matrix_endpoint_middlewares + [matrix_static_files_identifier + '-well-known-endpoint-compress'] %} +traefik.http.middlewares.{{ matrix_static_files_identifier }}-well-known-compress.compress=true +traefik.http.middlewares.{{ matrix_static_files_identifier }}-well-known-compress.compress.minResponseBodyBytes={{ matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_minResponseBodyBytes }} +{% set well_known_matrix_endpoint_middlewares = well_known_matrix_endpoint_middlewares + [matrix_static_files_identifier + '-well-known-compress'] %} {% endif %} -traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.rule={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_rule }} +traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.rule={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_rule }} {% if well_known_matrix_endpoint_middlewares | length > 0 %} -traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.middlewares={{ well_known_matrix_endpoint_middlewares | join(',') }} +traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.middlewares={{ well_known_matrix_endpoint_middlewares | join(',') }} {% endif %} {% if matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority | int > 0 %} -traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.priority={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority }} +traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.priority={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority }} {% endif %} -traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.service={{ matrix_static_files_identifier }} -traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.entrypoints={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_entrypoints }} -traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.tls={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls | to_json }} +traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.service={{ matrix_static_files_identifier }} +traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.entrypoints={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_entrypoints }} +traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.tls={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls | to_json }} {% if matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls %} -traefik.http.routers.{{ matrix_static_files_identifier }}-well-known-endpoint.tls.certResolver={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls_certResolver }} +traefik.http.routers.{{ matrix_static_files_identifier }}-well-known.tls.certResolver={{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls_certResolver }} {% endif %} {% endif %}