Procházet zdrojové kódy

Remove now-unused Traefik labels support from the rustpush bridge

The metrics endpoint was the only thing this bridge ever routed through
Traefik. With it gone, the container was still labeled `traefik.enable=true`
without defining any router, which makes Traefik fall back to its default
rule and produce a router pointing at nothing. It was also joining the
reverse-proxy network for no reason.

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/5487
pull/5494/head
Slavi Pantaleev před 2 dny
rodič
revize
bd2b13979a
4 změnil soubory, kde provedl 4 přidání a 25 odebrání
  1. +0
    -7
      group_vars/matrix_servers
  2. +0
    -9
      roles/custom/matrix-bridge-rustpush/defaults/main.yml
  3. +4
    -0
      roles/custom/matrix-bridge-rustpush/tasks/validate_config.yml
  4. +0
    -9
      roles/custom/matrix-bridge-rustpush/templates/labels.j2

+ 0
- 7
group_vars/matrix_servers Zobrazit soubor

@@ -1532,16 +1532,9 @@ matrix_bridge_rustpush_container_additional_networks_auto: |-
([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
+
([postgres_container_network] if (postgres_enabled and matrix_bridge_rustpush_database_hostname == postgres_connection_hostname and matrix_bridge_rustpush_container_network != postgres_container_network) else [])
+
([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_rustpush_container_labels_traefik_enabled else [])
) | unique
}}

matrix_bridge_rustpush_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
matrix_bridge_rustpush_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
matrix_bridge_rustpush_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
matrix_bridge_rustpush_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"

matrix_bridge_rustpush_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':imsg.as.token') | hash('sha512') | to_uuid }}"

matrix_bridge_rustpush_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"


+ 0
- 9
roles/custom/matrix-bridge-rustpush/defaults/main.yml Zobrazit soubor

@@ -68,15 +68,6 @@ matrix_bridge_rustpush_container_additional_networks: "{{ matrix_bridge_rustpush
matrix_bridge_rustpush_container_additional_networks_auto: []
matrix_bridge_rustpush_container_additional_networks_custom: []

# matrix_bridge_rustpush_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
# See `../templates/labels.j2` for details.
#
# To inject your own other container labels, see `matrix_bridge_rustpush_container_labels_additional_labels`.
matrix_bridge_rustpush_container_labels_traefik_enabled: true
matrix_bridge_rustpush_container_labels_traefik_docker_network: "{{ matrix_bridge_rustpush_container_network }}"
matrix_bridge_rustpush_container_labels_traefik_entrypoints: web-secure
matrix_bridge_rustpush_container_labels_traefik_tls_certResolver: default # noqa var-naming

# matrix_bridge_rustpush_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
# See `../templates/labels.j2` for details.
#


+ 4
- 0
roles/custom/matrix-bridge-rustpush/tasks/validate_config.yml Zobrazit soubor

@@ -24,6 +24,10 @@
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_traefik_tls_certResolver', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_middleware_basic_auth_enabled', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_metrics_middleware_basic_auth_users', 'new': '<removed> (the rustpush bridge does not support metrics)'}
- {'old': 'matrix_bridge_rustpush_container_labels_traefik_enabled', 'new': '<removed> (the bridge exposes nothing via Traefik)'}
- {'old': 'matrix_bridge_rustpush_container_labels_traefik_docker_network', 'new': '<removed> (the bridge exposes nothing via Traefik)'}
- {'old': 'matrix_bridge_rustpush_container_labels_traefik_entrypoints', 'new': '<removed> (the bridge exposes nothing via Traefik)'}
- {'old': 'matrix_bridge_rustpush_container_labels_traefik_tls_certResolver', 'new': '<removed> (the bridge exposes nothing via Traefik)'}

- name: Fail if required RustPush settings not defined
ansible.builtin.fail:


+ 0
- 9
roles/custom/matrix-bridge-rustpush/templates/labels.j2 Zobrazit soubor

@@ -5,13 +5,4 @@ SPDX-FileCopyrightText: 2026 Jason LaGuidice
SPDX-License-Identifier: AGPL-3.0-or-later
#}

{% if matrix_bridge_rustpush_container_labels_traefik_enabled %}
traefik.enable=true

{% if matrix_bridge_rustpush_container_labels_traefik_docker_network %}
traefik.docker.network={{ matrix_bridge_rustpush_container_labels_traefik_docker_network }}
{% endif %}

{% endif %}

{{ matrix_bridge_rustpush_container_labels_additional_labels }}

Načítá se…
Zrušit
Uložit