You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-2
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,34 @@ Once you have created the parameter, you must remove the variable `runners_token
148
148
149
149
Finally, the runner still supports the manual runner creation. No changes are required. Please keep in mind that this setup will be removed in future releases.
150
150
151
-
### Auto Scaling Group Instance Termination
151
+
### Auto Scaling Group
152
+
153
+
#### Scheduled scaling
154
+
155
+
When `enable_schedule=true`, the `schedule_config` variable can be used to scale the Auto Scaling group.
156
+
157
+
Scaling may be defined with one `scale_out` scheduled action and/or one `scale_in` scheduled action.
158
+
159
+
For example:
160
+
```hcl
161
+
module "runner" {
162
+
...
163
+
enable_schedule = true
164
+
schedule_config = {
165
+
# Configure optional scale_out scheduled action
166
+
scale_out_recurrence = "0 8 * * 1-5"
167
+
scale_out_count = 1 # Default for min_size, desired_capacity and max_size
@@ -505,7 +532,7 @@ Made with [contributors-img](https://contrib.rocks).
505
532
| <aname="input_runners_use_private_address"></a> [runners\_use\_private\_address](#input\_runners\_use\_private\_address)| Restrict runners to the use of a private IP address. If `runner_agent_uses_private_address` is set to `true`(default), `runners_use_private_address` will also apply for the agent. |`bool`|`true`| no |
506
533
| <aname="input_runners_volume_type"></a> [runners\_volume\_type](#input\_runners\_volume\_type)| Runner instance volume type |`string`|`"gp2"`| no |
507
534
| <aname="input_runners_volumes_tmpfs"></a> [runners\_volumes\_tmpfs](#input\_runners\_volumes\_tmpfs)| Mount a tmpfs in runner container. https://docs.gitlab.com/runner/executors/docker.html#mounting-a-directory-in-ram| <pre>list(object({<br> volume = string<br> options = string<br> }))</pre> |`[]`| no |
508
-
| <aname="input_schedule_config"></a> [schedule\_config](#input\_schedule\_config)| Map containing the configuration of the ASG scale-in and scale-up for the runner instance. Will only be used if enable\_schedule is set to true. |`map(any)`| <pre>{<br> "scale_in_count": 0,<br> "scale_in_recurrence": "0 18 * * 1-5",<br> "scale_out_count": 1,<br> "scale_out_recurrence": "0 8 * * 1-5"<br>}</pre> | no |
535
+
| <aname="input_schedule_config"></a> [schedule\_config](#input\_schedule\_config)| Map containing the configuration of the ASG scale-out and scale-in for the runner instance. Will only be used if enable\_schedule is set to true. |`map(any)`| <pre>{<br> "scale_in_count": 0,<br> "scale_in_recurrence": "0 18 * * 1-5",<br> "scale_out_count": 1,<br> "scale_out_recurrence": "0 8 * * 1-5"<br>}</pre> | no |
509
536
| <aname="input_secure_parameter_store_runner_sentry_dsn"></a> [secure\_parameter\_store\_runner\_sentry\_dsn](#input\_secure\_parameter\_store\_runner\_sentry\_dsn)| The Sentry DSN name used to store the Sentry DSN in Secure Parameter Store |`string`|`"sentry-dsn"`| no |
510
537
| <aname="input_secure_parameter_store_runner_token_key"></a> [secure\_parameter\_store\_runner\_token\_key](#input\_secure\_parameter\_store\_runner\_token\_key)| The key name used store the Gitlab runner token in Secure Parameter Store |`string`|`"runner-token"`| no |
511
538
| <aname="input_sentry_dsn"></a> [sentry\_dsn](#input\_sentry\_dsn)| Sentry DSN of the project for the runner to use (uses legacy DSN format) |`string`|`"__SENTRY_DSN_REPLACED_BY_USER_DATA__"`| no |
description="Map containing the configuration of the ASG scale-in and scale-up for the runner instance. Will only be used if enable_schedule is set to true. "
648
+
description="Map containing the configuration of the ASG scale-out and scale-in for the runner instance. Will only be used if enable_schedule is set to true. "
649
649
type=map(any)
650
650
default={
651
-
scale_in_recurrence ="0 18 * * 1-5"
652
-
scale_in_count =0
651
+
# Configure optional scale_out scheduled action
653
652
scale_out_recurrence ="0 8 * * 1-5"
654
-
scale_out_count =1
653
+
scale_out_count =1# Default for min_size, desired_capacity and max_size
0 commit comments