# SPDX-FileCopyrightText: 2022 MDAD project contributors
# SPDX-FileCopyrightText: 2024 wjbeckett
# SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
#
# SPDX-License-Identifier: AGPL-3.0-or-later

---

# Project source code URL: https://github.com/element-hq/lk-jwt-service

matrix_livekit_jwt_service_enabled: false

matrix_livekit_jwt_service_scheme: https
matrix_livekit_jwt_service_hostname: ""
matrix_livekit_jwt_service_path_prefix: "/livekit-jwt-service"

matrix_livekit_jwt_service_base_path: "{{ matrix_base_data_path }}/livekit-jwt-service"

matrix_livekit_jwt_service_container_network: ''

matrix_livekit_jwt_service_container_http_host_bind_port: ''

matrix_livekit_jwt_service_container_additional_networks: "{{ (matrix_livekit_jwt_service_container_additional_networks_auto + matrix_livekit_jwt_service_container_additional_networks_custom) | unique }}"
matrix_livekit_jwt_service_container_additional_networks_auto: []
matrix_livekit_jwt_service_container_additional_networks_custom: []

# renovate: datasource=docker depName=ghcr.io/element-hq/lk-jwt-service
matrix_livekit_jwt_service_version: 0.2.3

matrix_livekit_jwt_service_container_image_self_build: false
matrix_livekit_jwt_service_container_repo: "https://github.com/element-hq/lk-jwt-service.git"
matrix_livekit_jwt_service_container_repo_version: "{{ 'main' if matrix_livekit_jwt_service_version == 'latest' else ('v' + livekit_server_version) }}"
matrix_livekit_jwt_service_container_src_files_path: "{{ matrix_livekit_jwt_service_base_path }}/container-src"

matrix_livekit_jwt_service_container_image: "{{ matrix_livekit_jwt_service_container_image_registry_prefix }}element-hq/lk-jwt-service:{{ matrix_livekit_jwt_service_container_image_tag }}"
matrix_livekit_jwt_service_container_image_registry_prefix: "{{ 'localhost/' if matrix_livekit_jwt_service_container_image_self_build else matrix_livekit_jwt_service_container_image_registry_prefix_upstream }}"
matrix_livekit_jwt_service_container_image_registry_prefix_upstream: "{{ matrix_livekit_jwt_service_container_image_registry_prefix_upstream_default }}"
matrix_livekit_jwt_service_container_image_registry_prefix_upstream_default: ghcr.io/
matrix_livekit_jwt_service_container_image_tag: "{{ matrix_livekit_jwt_service_version }}"
matrix_livekit_jwt_service_container_image_force_pull: "{{ matrix_livekit_jwt_service_container_image.endswith(':latest') }}"

matrix_livekit_jwt_service_container_labels_traefik_enabled: true
matrix_livekit_jwt_service_container_labels_traefik_docker_network: "{{ matrix_livekit_jwt_service_container_network }}"
matrix_livekit_jwt_service_container_labels_traefik_hostname: "{{ matrix_livekit_jwt_service_hostname }}"
# The path prefix must either be `/` or not end with a slash (e.g. `/livekit-jwt-service`).
matrix_livekit_jwt_service_container_labels_traefik_path_prefix: "{{ matrix_livekit_jwt_service_path_prefix }}"
matrix_livekit_jwt_service_container_labels_traefik_rule: "Host(`{{ matrix_livekit_jwt_service_container_labels_traefik_hostname }}`){% if matrix_livekit_jwt_service_container_labels_traefik_path_prefix != '/' %} && PathPrefix(`{{ matrix_livekit_jwt_service_container_labels_traefik_path_prefix }}`){% endif %}"
matrix_livekit_jwt_service_container_labels_traefik_priority: 0
matrix_livekit_jwt_service_container_labels_traefik_entrypoints: web-secure
matrix_livekit_jwt_service_container_labels_traefik_tls: "{{ matrix_livekit_jwt_service_container_labels_traefik_entrypoints != 'web' }}"
matrix_livekit_jwt_service_container_labels_traefik_tls_certResolver: default  # noqa var-naming

# Controls which additional headers to attach to all HTTP responses.
# To add your own headers, use `matrix_livekit_jwt_service_container_labels_traefik_additional_response_headers_custom`
matrix_livekit_jwt_service_container_labels_traefik_additional_response_headers: "{{ matrix_livekit_jwt_service_container_labels_traefik_additional_response_headers_auto | combine(matrix_livekit_jwt_service_container_labels_traefik_additional_response_headers_custom) }}"
matrix_livekit_jwt_service_container_labels_traefik_additional_response_headers_auto: {}
matrix_livekit_jwt_service_container_labels_traefik_additional_response_headers_custom: {}

# matrix_livekit_jwt_service_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
# See `../templates/labels.j2` for details.
#
# Example:
# matrix_livekit_jwt_service_container_labels_additional_labels: |
#   my.label=1
#   another.label="here"
matrix_livekit_jwt_service_container_labels_additional_labels: ''

# A list of extra arguments to pass to the container
matrix_livekit_jwt_service_container_extra_arguments: []

# Controls the LK_JWT_PORT environment variable
matrix_livekit_jwt_service_environment_variable_livekit_jwt_port: 8080

# Controls the LIVEKIT_KEY environment variable
matrix_livekit_jwt_service_environment_variable_livekit_key: ""

# Controls the LIVEKIT_URL environment variable
matrix_livekit_jwt_service_environment_variable_livekit_url: ""

# Controls the LIVEKIT_SECRET environment variable
matrix_livekit_jwt_service_environment_variable_livekit_secret: ""

# Additional environment variables to pass to the container.
#
# Environment variables take priority over settings in the configuration file.
#
# Example:
# matrix_livekit_jwt_service_environment_variables_extension: |
#   KEY=value
matrix_livekit_jwt_service_environment_variables_extension: ''

# List of systemd services that LiveKit JWT Service service depends on
matrix_livekit_jwt_service_systemd_required_services_list: "{{ matrix_livekit_jwt_service_systemd_required_services_list_default + matrix_livekit_jwt_service_systemd_required_services_list_auto + matrix_livekit_jwt_service_systemd_required_services_list_custom }}"
matrix_livekit_jwt_service_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
matrix_livekit_jwt_service_systemd_required_services_list_auto: []
matrix_livekit_jwt_service_systemd_required_services_list_custom: []
