diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 6c20fe128..f7cac13be 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -3060,9 +3060,6 @@ matrix_bridge_steam_container_labels_traefik_docker_network: "{{ matrix_playbook matrix_bridge_steam_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}" matrix_bridge_steam_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" -matrix_bridge_steam_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}" -matrix_bridge_steam_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}" - matrix_bridge_steam_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':steam.as.token') | hash('sha512') | to_uuid }}" matrix_bridge_steam_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}" @@ -3083,12 +3080,6 @@ matrix_bridge_steam_double_puppet_secrets_auto: |- else {} }} -matrix_bridge_steam_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}" - -matrix_bridge_steam_metrics_proxying_enabled: "{{ matrix_bridge_steam_metrics_enabled and matrix_metrics_exposure_enabled }}" -matrix_bridge_steam_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}" -matrix_bridge_steam_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/matrix-steam-bridge" - matrix_bridge_steam_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}" matrix_bridge_steam_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.twt.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}" diff --git a/roles/custom/matrix-bridge-steam/defaults/main.yml b/roles/custom/matrix-bridge-steam/defaults/main.yml index 9d5e3be77..6ebc8b13b 100644 --- a/roles/custom/matrix-bridge-steam/defaults/main.yml +++ b/roles/custom/matrix-bridge-steam/defaults/main.yml @@ -94,17 +94,6 @@ matrix_bridge_steam_container_labels_traefik_entrypoints: web-secure matrix_bridge_steam_container_labels_traefik_tls: "{{ matrix_bridge_steam_container_labels_traefik_entrypoints != 'web' }}" matrix_bridge_steam_container_labels_traefik_tls_certResolver: default # noqa var-naming -# Controls whether labels will be added that expose mautrix-instagram's metrics -matrix_bridge_steam_container_labels_metrics_enabled: "{{ matrix_bridge_steam_metrics_enabled and matrix_bridge_steam_metrics_proxying_enabled }}" -matrix_bridge_steam_container_labels_metrics_traefik_rule: "Host(`{{ matrix_bridge_steam_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_bridge_steam_metrics_proxying_path_prefix }}`)" -matrix_bridge_steam_container_labels_metrics_traefik_priority: 0 -matrix_bridge_steam_container_labels_metrics_traefik_entrypoints: "{{ matrix_bridge_steam_container_labels_traefik_entrypoints }}" -matrix_bridge_steam_container_labels_metrics_traefik_tls: "{{ matrix_bridge_steam_container_labels_metrics_traefik_entrypoints != 'web' }}" -matrix_bridge_steam_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_bridge_steam_container_labels_traefik_tls_certResolver }}" # noqa var-naming -matrix_bridge_steam_container_labels_metrics_middleware_basic_auth_enabled: false -# See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users -matrix_bridge_steam_container_labels_metrics_middleware_basic_auth_users: '' - # matrix_bridge_steam_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file. # See `../templates/labels.j2` for details. # @@ -199,16 +188,6 @@ matrix_bridge_steam_provisioning_shared_secret: disable # Valid values: fatal, error, warn, info, debug, trace matrix_bridge_steam_logging_level: 'warn' -# Whether or not metrics endpoint should be enabled. -# Enabling them is usually enough for a local (in-container) Prometheus to consume them. -# If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_bridge_steam_metrics_proxying_enabled`. -matrix_bridge_steam_metrics_enabled: false - -# Controls whether metrics should be exposed on a public URL. -matrix_bridge_steam_metrics_proxying_enabled: false -matrix_bridge_steam_metrics_proxying_hostname: '' -matrix_bridge_steam_metrics_proxying_path_prefix: '' - # Default configuration template which covers the generic use case. # You can customize it by controlling the various variables inside it. # diff --git a/roles/custom/matrix-bridge-steam/tasks/validate_config.yml b/roles/custom/matrix-bridge-steam/tasks/validate_config.yml index 57e49391c..b3e2db974 100644 --- a/roles/custom/matrix-bridge-steam/tasks/validate_config.yml +++ b/roles/custom/matrix-bridge-steam/tasks/validate_config.yml @@ -20,6 +20,18 @@ - {'old': 'matrix_bridge_steam_docker_image_tag', 'new': 'matrix_bridge_steam_container_image_tag'} - {'old': 'matrix_bridge_steam_docker_src_files_path', 'new': 'matrix_bridge_steam_container_src_files_path'} - {'old': 'matrix_bridge_steam_container_image_force_pull', 'new': ' (the new community.docker.docker_image_pull module handles this natively)'} + - {'old': 'matrix_bridge_steam_metrics_enabled', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_metrics_proxying_enabled', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_metrics_proxying_hostname', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_metrics_proxying_path_prefix', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_container_labels_metrics_enabled', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_container_labels_metrics_traefik_rule', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_container_labels_metrics_traefik_priority', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_container_labels_metrics_traefik_entrypoints', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_container_labels_metrics_traefik_tls', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_container_labels_metrics_traefik_tls_certResolver', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_container_labels_metrics_middleware_basic_auth_enabled', 'new': ' (the Steam bridge does not support metrics)'} + - {'old': 'matrix_bridge_steam_container_labels_metrics_middleware_basic_auth_users', 'new': ' (the Steam bridge does not support metrics)'} - name: Fail if required matrix_bridge_steam settings not defined ansible.builtin.fail: @@ -32,6 +44,4 @@ - {'name': 'matrix_bridge_steam_homeserver_token', when: true} - {'name': 'matrix_bridge_steam_database_hostname', when: "{{ matrix_bridge_steam_database_engine == 'postgres' }}"} - {'name': 'matrix_bridge_steam_container_network', when: true} - - {'name': 'matrix_bridge_steam_metrics_proxying_hostname', when: "{{ matrix_bridge_steam_metrics_proxying_enabled }}"} - - {'name': 'matrix_bridge_steam_metrics_proxying_path_prefix', when: "{{ matrix_bridge_steam_metrics_proxying_enabled }}"} # TODO: Confirm additional config isn't mandatory for public_media diff --git a/roles/custom/matrix-bridge-steam/templates/labels.j2 b/roles/custom/matrix-bridge-steam/templates/labels.j2 index c087b47a7..aed502cd8 100644 --- a/roles/custom/matrix-bridge-steam/templates/labels.j2 +++ b/roles/custom/matrix-bridge-steam/templates/labels.j2 @@ -12,41 +12,6 @@ traefik.docker.network={{ matrix_bridge_steam_container_labels_traefik_docker_ne {% endif %} traefik.http.services.matrix-steam-bridge.loadbalancer.server.port={{ matrix_bridge_steam_appservice_port }} -traefik.http.services.matrix-steam-bridge-metrics.loadbalancer.server.port=8000 - -{% if matrix_bridge_steam_container_labels_metrics_enabled %} -############################################################ -# # -# Metrics # -# # -############################################################ - -{% if matrix_bridge_steam_container_labels_metrics_middleware_basic_auth_enabled %} -traefik.http.middlewares.matrix-steam-bridge-metrics-basic-auth.basicauth.users={{ matrix_bridge_steam_container_labels_metrics_middleware_basic_auth_users }} -traefik.http.routers.matrix-steam-bridge-metrics.middlewares=matrix-steam-bridge-metrics-basic-auth -{% endif %} - -traefik.http.routers.matrix-steam-bridge-metrics.rule={{ matrix_bridge_steam_container_labels_metrics_traefik_rule }} - -{% if matrix_bridge_steam_container_labels_metrics_traefik_priority | int > 0 %} -traefik.http.routers.matrix-steam-bridge-metrics.priority={{ matrix_bridge_steam_container_labels_metrics_traefik_priority }} -{% endif %} - -traefik.http.routers.matrix-steam-bridge-metrics.service=matrix-steam-bridge-metrics -traefik.http.routers.matrix-steam-bridge-metrics.entrypoints={{ matrix_bridge_steam_container_labels_metrics_traefik_entrypoints }} - -traefik.http.routers.matrix-steam-bridge-metrics.tls={{ matrix_bridge_steam_container_labels_metrics_traefik_tls | to_json }} -{% if matrix_bridge_steam_container_labels_metrics_traefik_tls %} -traefik.http.routers.matrix-steam-bridge-metrics.tls.certResolver={{ matrix_bridge_steam_container_labels_metrics_traefik_tls_certResolver }} -{% endif %} - -############################################################ -# # -# /Metrics # -# # -############################################################ -{% endif %} - {% if matrix_bridge_steam_public_media_enabled %} ############################################################