Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
| <a name="input_runner_terminate_ec2_lifecycle_timeout_duration"></a> [runner\_terminate\_ec2\_lifecycle\_timeout\_duration](#input\_runner\_terminate\_ec2\_lifecycle\_timeout\_duration) | Amount of time in seconds to wait for GitLab Runner to finish picked up jobs. Defaults to the `maximum_timeout` configured + `5m`. Maximum allowed is `7200` (2 hours) | `number` | `null` | no |
| <a name="input_runner_terminate_ec2_timeout_duration"></a> [runner\_terminate\_ec2\_timeout\_duration](#input\_runner\_terminate\_ec2\_timeout\_duration) | Timeout in seconds for the graceful terminate worker Lambda function. | `number` | `90` | no |
| <a name="input_runner_terraform_timeout_delete_asg"></a> [runner\_terraform\_timeout\_delete\_asg](#input\_runner\_terraform\_timeout\_delete\_asg) | Timeout when trying to delete the Runner ASG. | `string` | `"10m"` | no |
| <a name="input_runner_worker"></a> [runner\_worker](#input\_runner\_worker) | For detailed information, check https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section.<br/><br/>environment\_variables = List of environment variables to add to the Runner Worker (environment).<br/>max\_jobs = Number of jobs which can be processed in parallel by the Runner Worker.<br/>output\_limit = Sets the maximum build log size in kilobytes. Default is 4MB (output\_limit).<br/>request\_concurrency = Limit number of concurrent requests for new jobs from GitLab (default 1) (request\_concurrency).<br/>ssm\_access = Allows to connect to the Runner Worker via SSM.<br/>type = The Runner Worker type to use. Currently supports `docker+machine` or `docker` or `docker-autoscaler`.<br/>use\_private\_key = Use a private key to connect the Runner Manager to the Runner Workers. Ignored when fleeting is enabled (defaults to `true`). | <pre>object({<br/> environment_variables = optional(list(string), [])<br/> max_jobs = optional(number, 0)<br/> output_limit = optional(number, 4096)<br/> request_concurrency = optional(number, 1)<br/> ssm_access = optional(bool, false)<br/> type = optional(string, "docker+machine")<br/> # false positive, use_private_key is not a secret<br/> # kics-scan ignore-line<br/> use_private_key = optional(bool, false)<br/> })</pre> | `{}` | no |
| <a name="input_runner_worker"></a> [runner\_worker](#input\_runner\_worker) | For detailed information, check https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section.<br/><br/>environment\_variables = List of environment variables to add to the Runner Worker (environment).<br/>max\_jobs = Number of jobs which can be processed in parallel by the Runner Worker.<br/>output\_limit = Sets the maximum build log size in kilobytes. Default is 4MB (output\_limit).<br/>request\_concurrency = Limit number of concurrent requests for new jobs from GitLab (default 1) (request\_concurrency).<br/>strict\_check\_interval = Enforces the `check_interval` instead of immediately re-polling after receiving jobs.<br/>ssm\_access = Allows to connect to the Runner Worker via SSM.<br/>type = The Runner Worker type to use. Currently supports `docker+machine` or `docker` or `docker-autoscaler`.<br/>use\_private\_key = Use a private key to connect the Runner Manager to the Runner Workers. Ignored when fleeting is enabled (defaults to `true`). | <pre>object({<br/> environment_variables = optional(list(string), [])<br/> max_jobs = optional(number, 0)<br/> output_limit = optional(number, 4096)<br/> request_concurrency = optional(number, 1)<br/> strict_check_interval = optional(bool, false)<br/> ssm_access = optional(bool, false)<br/> type = optional(string, "docker+machine")<br/> # false positive, use_private_key is not a secret<br/> # kics-scan ignore-line<br/> use_private_key = optional(bool, false)<br/> })</pre> | `{}` | no |
| <a name="input_runner_worker_cache"></a> [runner\_worker\_cache](#input\_runner\_worker\_cache) | Configuration to control the creation of the cache bucket. By default the bucket will be created and used as shared<br/>cache. To use the same cache across multiple Runner Worker disable the creation of the cache and provide a policy and<br/>bucket name. See the public runner example for more details."<br/><br/>For detailed documentation check https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnerscaches3-section.<br/><br/>access\_log\_bucker\_id = The ID of the bucket where the access logs are stored.<br/>access\_log\_bucket\_prefix = The bucket prefix for the access logs.<br/>authentication\_type = A string that declares the AuthenticationType for [runners.cache.s3]. Can either be 'iam' or 'credentials'.<br/>bucket = Name of the cache bucket. Requires `create = false`.<br/>bucket\_prefix = Prefix for s3 cache bucket name. Requires `create = true`.<br/>create = Boolean used to enable or disable the creation of the cache bucket.<br/>create\_aws\_s3\_bucket\_public\_access\_block = Boolean used to enable or disable the creation of the public access block for the cache bucket. Useful when organizations do not allow the creation of public access blocks on individual buckets (e.g. public access is blocked on all buckets at the organization level).<br/>expiration\_days = Number of days before cache objects expire. Requires `create = true`.<br/>include\_account\_id = Boolean used to include the account id in the cache bucket name. Requires `create = true`.<br/>policy = Policy to use for the cache bucket. Requires `create = false`.<br/>random\_suffix = Boolean used to enable or disable the use of a random string suffix on the cache bucket name. Requires `create = true`.<br/>shared = Boolean used to enable or disable the use of the cache bucket as shared cache.<br/>versioning = Boolean used to enable versioning on the cache bucket. Requires `create = true`. | <pre>object({<br/> access_log_bucket_id = optional(string, null)<br/> access_log_bucket_prefix = optional(string, null)<br/> authentication_type = optional(string, "iam")<br/> bucket = optional(string, "")<br/> bucket_prefix = optional(string, "")<br/> create = optional(bool, true)<br/> create_aws_s3_bucket_public_access_block = optional(bool, true)<br/> expiration_days = optional(number, 1)<br/> include_account_id = optional(bool, true)<br/> policy = optional(string, "")<br/> random_suffix = optional(bool, false)<br/> shared = optional(bool, false)<br/> versioning = optional(bool, false)<br/> })</pre> | `{}` | no |
| <a name="input_runner_worker_docker_add_dind_volumes"></a> [runner\_worker\_docker\_add\_dind\_volumes](#input\_runner\_worker\_docker\_add\_dind\_volumes) | Add certificates and docker.sock to the volumes to support docker-in-docker (dind) | `bool` | `false` | no |
| <a name="input_runner_worker_docker_autoscaler"></a> [runner\_worker\_docker\_autoscaler](#input\_runner\_worker\_docker\_autoscaler) | fleeting\_plugin\_version = The version of aws fleeting plugin.<br/>connector\_config\_user = User to connect to worker machine.<br/>key\_pair\_name = The name of the key pair used by the Runner to connect to the docker-machine Runner Workers. This variable is only supported when `enables` is set to `true`.<br/>capacity\_per\_instance = The number of jobs that can be executed concurrently by a single instance.<br/>max\_use\_count = Max job number that can run on a worker.<br/>update\_interval = The interval to check with the fleeting plugin for instance updates.<br/>update\_interval\_when\_expecting = The interval to check with the fleeting plugin for instance updates when expecting a state change.<br/>instance\_ready\_command = Executes this command on each instance provisioned by the autoscaler to ensure that it is ready for use. A failure results in the instance being removed. | <pre>object({<br/> fleeting_plugin_version = optional(string, "1.0.0")<br/> connector_config_user = optional(string, "ec2-user")<br/> key_pair_name = optional(string, "runner-worker-key")<br/> capacity_per_instance = optional(number, 1)<br/> max_use_count = optional(number, 100)<br/> update_interval = optional(string, "1m")<br/> update_interval_when_expecting = optional(string, "2s")<br/> instance_ready_command = optional(string, "")<br/> })</pre> | `{}` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ locals {
runners_post_build_script = var.runner_worker_gitlab_pipeline.post_build_script
runners_pre_clone_script = var.runner_worker_gitlab_pipeline.pre_clone_script
runners_request_concurrency = var.runner_worker.request_concurrency
runners_strict_check_interval = var.runner_worker.strict_check_interval
runners_output_limit = var.runner_worker.output_limit
runners_check_interval = var.runner_manager.gitlab_check_interval
runners_volumes_tmpfs = join("\n", [for v in var.runner_worker_docker_volumes_tmpfs : format("\"%s\" = \"%s\"", v.volume, v.options)])
Expand Down
1 change: 1 addition & 0 deletions template/runner-config.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ connection_max_age = "${connection_max_age}"
pre_clone_script = ${runners_pre_clone_script}
pre_get_sources_script = ${runners_pre_clone_script}
request_concurrency = ${runners_request_concurrency}
strict_check_interval = ${runners_strict_check_interval}
output_limit = ${runners_output_limit}
limit = ${runners_limit}

Expand Down
2 changes: 2 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ variable "runner_worker" {
max_jobs = Number of jobs which can be processed in parallel by the Runner Worker.
output_limit = Sets the maximum build log size in kilobytes. Default is 4MB (output_limit).
request_concurrency = Limit number of concurrent requests for new jobs from GitLab (default 1) (request_concurrency).
strict_check_interval = Enforces the `check_interval` instead of immediately re-polling after receiving jobs.
ssm_access = Allows to connect to the Runner Worker via SSM.
type = The Runner Worker type to use. Currently supports `docker+machine` or `docker` or `docker-autoscaler`.
use_private_key = Use a private key to connect the Runner Manager to the Runner Workers. Ignored when fleeting is enabled (defaults to `true`).
Expand All @@ -543,6 +544,7 @@ variable "runner_worker" {
max_jobs = optional(number, 0)
output_limit = optional(number, 4096)
request_concurrency = optional(number, 1)
strict_check_interval = optional(bool, false)
ssm_access = optional(bool, false)
type = optional(string, "docker+machine")
# false positive, use_private_key is not a secret
Expand Down