diff --git a/main.tf b/main.tf index 1f00a474..9696c453 100644 --- a/main.tf +++ b/main.tf @@ -150,6 +150,7 @@ locals { shared_cache = var.runner_worker_cache.shared sentry_dsn = var.runner_manager.sentry_dsn prometheus_listen_address = var.runner_manager.prometheus_listen_address + connection_max_age = var.runner_manager.connection_max_age auth_type = var.runner_worker_cache.authentication_type runners_docker_autoscaler = var.runner_worker.type == "docker-autoscaler" ? local.template_runner_docker_autoscaler : "" runners_docker_machine = var.runner_worker.type == "docker+machine" ? local.template_runner_docker_machine : "" diff --git a/template/runner-config.tftpl b/template/runner-config.tftpl index aabf0f3d..50e89752 100644 --- a/template/runner-config.tftpl +++ b/template/runner-config.tftpl @@ -3,6 +3,7 @@ check_interval = ${runners_check_interval} sentry_dsn = "${sentry_dsn}" log_format = "json" listen_address = "${prometheus_listen_address}" +connection_max_age = "${connection_max_age}" [[runners]] name = "${runners_name}" diff --git a/variables.tf b/variables.tf index b1896957..1aa1d4a6 100644 --- a/variables.tf +++ b/variables.tf @@ -90,12 +90,14 @@ variable "runner_manager" { maximum_concurrent_jobs = The maximum number of jobs which can be processed by all Runners at the same time (concurrent). prometheus_listen_address = Defines an address (:) the Prometheus metrics HTTP server should listen on (listen_address). sentry_dsn = Sentry DSN of the project for the Runner Manager to use (uses legacy DSN format) (sentry_dsn) + connection_max_age = The maximum age of a connection to the Runner Manager (connection_max_age). EOT type = object({ gitlab_check_interval = optional(number, 3) maximum_concurrent_jobs = optional(number, 10) prometheus_listen_address = optional(string, "") sentry_dsn = optional(string, "__SENTRY_DSN_REPLACED_BY_USER_DATA__") + connection_max_age = optional(string, "15m") }) default = {} }