Make Traefik labels files look better
This moves the comments from being just in Jinja, to actually ending up in the generated `labels` file, which makes inspection of the final result easier. Also, some new lines were added here and there to make labels more legible. The generated file may still include weird new-lines due to various `if` statements yielding content or not, but that's not so ugly anymore - now that we have proper start/end sections that are visible in the final `labels` file.
This commit is contained in:
@ -10,10 +10,12 @@ traefik.http.services.matrix-synapse-federation-api.loadbalancer.server.port={{
|
||||
traefik.http.services.matrix-synapse-metrics.loadbalancer.server.port={{ matrix_synapse_metrics_port }}
|
||||
|
||||
|
||||
{#
|
||||
Public Root path (/)
|
||||
#}
|
||||
{% if matrix_synapse_container_labels_public_client_root_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Public Root path (/) #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
{% set client_root_middlewares = [] %}
|
||||
|
||||
@ -42,26 +44,20 @@ traefik.http.routers.matrix-synapse-public-client-root.tls={{ matrix_synapse_con
|
||||
traefik.http.routers.matrix-synapse-public-client-root.tls.certResolver={{ matrix_synapse_container_labels_public_client_root_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# /Public Root path (/) #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
{#
|
||||
/Public Root path (/)
|
||||
#}
|
||||
|
||||
|
||||
{#
|
||||
#########################################################################
|
||||
# #
|
||||
# Matrix-related labels #
|
||||
# See: `matrix_synapse_container_labels_matrix_related_labels_enabled` #
|
||||
# #
|
||||
#########################################################################
|
||||
#}
|
||||
{% if matrix_synapse_container_labels_matrix_related_labels_enabled %}
|
||||
|
||||
{#
|
||||
Public Client-API (/_matrix)
|
||||
#}
|
||||
{% if matrix_synapse_container_labels_public_client_api_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Public Client-API (/_matrix) #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
traefik.http.routers.matrix-synapse-public-client-api.rule={{ matrix_synapse_container_labels_public_client_api_traefik_rule }}
|
||||
|
||||
@ -77,17 +73,21 @@ traefik.http.routers.matrix-synapse-public-client-api.tls={{ matrix_synapse_cont
|
||||
traefik.http.routers.matrix-synapse-public-client-api.tls.certResolver={{ matrix_synapse_container_labels_public_client_api_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# /Public Client-API (/_matrix) #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
{#
|
||||
/Public Client-API (/_matrix)
|
||||
#}
|
||||
|
||||
|
||||
|
||||
{#
|
||||
Internal Client-API (/_matrix)
|
||||
#}
|
||||
{% if matrix_synapse_container_labels_internal_client_api_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Internal Client-API (/_matrix) #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
traefik.http.routers.matrix-synapse-internal-client-api.rule={{ matrix_synapse_container_labels_internal_client_api_traefik_rule }}
|
||||
|
||||
@ -98,16 +98,20 @@ traefik.http.routers.matrix-synapse-internal-client-api.priority={{ matrix_synap
|
||||
traefik.http.routers.matrix-synapse-internal-client-api.service=matrix-synapse-client-api
|
||||
traefik.http.routers.matrix-synapse-internal-client-api.entrypoints={{ matrix_synapse_container_labels_internal_client_api_traefik_entrypoints }}
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# /Internal Client-API (/_matrix) #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
{#
|
||||
/Internal Client-API (/_matrix)
|
||||
#}
|
||||
|
||||
|
||||
{#
|
||||
Public Synapse Admin API (/_synapse/client)
|
||||
#}
|
||||
{% if matrix_synapse_container_labels_public_client_synapse_client_api_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Public Synapse Admin API (/_synapse/client) #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
traefik.http.routers.matrix-synapse-public-client-synapse-client-api.rule={{ matrix_synapse_container_labels_public_client_synapse_client_api_traefik_rule }}
|
||||
|
||||
@ -123,16 +127,20 @@ traefik.http.routers.matrix-synapse-public-client-synapse-client-api.tls={{ matr
|
||||
traefik.http.routers.matrix-synapse-public-client-synapse-client-api.tls.certResolver={{ matrix_synapse_container_labels_public_client_synapse_client_api_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# /Public Synapse Admin API (/_synapse/client) #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
{#
|
||||
/Public Synapse Admin API (/_synapse/client)
|
||||
#}
|
||||
|
||||
|
||||
{#
|
||||
Public Synapse OIDC API (/_synapse/oidc)
|
||||
#}
|
||||
{% if matrix_synapse_container_labels_public_client_synapse_oidc_api_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Public Synapse OIDC API (/_synapse/oidc) #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
traefik.http.routers.matrix-synapse-public-client-synapse-oidc-api.rule={{ matrix_synapse_container_labels_public_client_synapse_oidc_api_traefik_rule }}
|
||||
|
||||
@ -148,16 +156,20 @@ traefik.http.routers.matrix-synapse-public-client-synapse-oidc-api.tls={{ matrix
|
||||
traefik.http.routers.matrix-synapse-public-client-synapse-oidc-api.tls.certResolver={{ matrix_synapse_container_labels_public_client_synapse_oidc_api_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# /Public Synapse OIDC API (/_synapse/oidc) #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
{#
|
||||
/Public Synapse OIDC API (/_synapse/oidc)
|
||||
#}
|
||||
|
||||
|
||||
{#
|
||||
Public Synapse Admin API (/_synapse/admin)
|
||||
#}
|
||||
{% if matrix_synapse_container_labels_public_client_synapse_admin_api_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Public Synapse Admin API (/_synapse/admin) #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
traefik.http.routers.matrix-synapse-public-client-synapse-admin-api.rule={{ matrix_synapse_container_labels_public_client_synapse_admin_api_traefik_rule }}
|
||||
|
||||
@ -173,16 +185,20 @@ traefik.http.routers.matrix-synapse-public-client-synapse-admin-api.tls={{ matri
|
||||
traefik.http.routers.matrix-synapse-public-client-synapse-admin-api.tls.certResolver={{ matrix_synapse_container_labels_public_client_synapse_admin_api_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# /Public Synapse Admin API (/_synapse/admin) #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
{#
|
||||
/Public Synapse Admin API (/_synapse/admin)
|
||||
#}
|
||||
|
||||
|
||||
{#
|
||||
Public Federation-API (/_matrix)
|
||||
#}
|
||||
{% if matrix_synapse_container_labels_public_federation_api_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Public Federation-API (/_matrix) #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
traefik.http.routers.matrix-synapse-public-federation-api.rule={{ matrix_synapse_container_labels_public_federation_api_traefik_rule }}
|
||||
|
||||
@ -198,26 +214,20 @@ traefik.http.routers.matrix-synapse-public-federation-api.tls={{ matrix_synapse_
|
||||
traefik.http.routers.matrix-synapse-public-federation-api.tls.certResolver={{ matrix_synapse_container_labels_public_federation_api_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{#
|
||||
/Public Federation-API (/_matrix)
|
||||
#}
|
||||
|
||||
{#
|
||||
#########################################################################
|
||||
# #
|
||||
# /Matrix-related labels #
|
||||
# See: `matrix_synapse_container_labels_matrix_related_labels_enabled` #
|
||||
# #
|
||||
#########################################################################
|
||||
#}
|
||||
############################################################
|
||||
# #
|
||||
# /Public Federation-API (/_matrix) #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
|
||||
|
||||
{#
|
||||
Public Metrics (e.g. /metrics/synapse/main-process)
|
||||
#}
|
||||
{% if matrix_synapse_container_labels_public_metrics_enabled %}
|
||||
############################################################
|
||||
# #
|
||||
# Public Metrics (e.g. /metrics/synapse/main-process) #
|
||||
# #
|
||||
############################################################
|
||||
|
||||
{% set metrics_middlewares = [] %}
|
||||
|
||||
@ -247,10 +257,12 @@ traefik.http.routers.matrix-synapse-metrics.tls={{ matrix_synapse_container_labe
|
||||
traefik.http.routers.matrix-synapse-metrics.tls.certResolver={{ matrix_synapse_container_labels_public_metrics_traefik_tls_certResolver }}
|
||||
{% endif %}
|
||||
|
||||
############################################################
|
||||
# #
|
||||
# /Public Metrics (e.g. /metrics/synapse/main-process) #
|
||||
# #
|
||||
############################################################
|
||||
{% endif %}
|
||||
{#
|
||||
/Public Metrics (e.g. /metrics/synapse/main-process)
|
||||
#}
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user