Skip to content

Commit d441e27

Browse files
mmoutama09npalm
andauthoredMay 16, 2022
feat: Add option to specify prometheus metrics listen address #478
Co-authored-by: Niek Palm <[email protected]>
1 parent 588c4cf commit d441e27

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ terraform destroy
429429
| <a name="input_metrics_autoscaling"></a> [metrics\_autoscaling](#input\_metrics\_autoscaling) | A list of metrics to collect. The allowed values are GroupDesiredCapacity, GroupInServiceCapacity, GroupPendingCapacity, GroupMinSize, GroupMaxSize, GroupInServiceInstances, GroupPendingInstances, GroupStandbyInstances, GroupStandbyCapacity, GroupTerminatingCapacity, GroupTerminatingInstances, GroupTotalCapacity, GroupTotalInstances. | `list(string)` | `null` | no |
430430
| <a name="input_overrides"></a> [overrides](#input\_overrides) | This map provides the possibility to override some defaults. <br>The following attributes are supported: <br> * `name_sg` set the name prefix and overwrite the `Name` tag for all security groups created by this module. <br> * `name_runner_agent_instance` set the name prefix and override the `Name` tag for the EC2 gitlab runner instances defined in the auto launch configuration. <br> * `name_docker_machine_runners` override the `Name` tag of EC2 instances created by the runner agent. <br> * `name_iam_objects` set the name prefix of all AWS IAM resources created by this module. | `map(string)` | <pre>{<br> "name_docker_machine_runners": "",<br> "name_iam_objects": "",<br> "name_runner_agent_instance": "",<br> "name_sg": ""<br>}</pre> | no |
431431
| <a name="input_permissions_boundary"></a> [permissions\_boundary](#input\_permissions\_boundary) | Name of permissions boundary policy to attach to AWS IAM roles | `string` | `""` | no |
432+
| <a name="input_prometheus_listen_address"></a> [prometheus\_listen\_address](#input\_prometheus\_listen\_address) | Defines an address (<host>:<port>) the Prometheus metrics HTTP server should listen on. | `string` | `""` | no |
432433
| <a name="input_role_tags"></a> [role\_tags](#input\_role\_tags) | Map of tags that will be added to the role created. Useful for tag based authorization. | `map(string)` | `{}` | no |
433434
| <a name="input_runner_agent_uses_private_address"></a> [runner\_agent\_uses\_private\_address](#input\_runner\_agent\_uses\_private\_address) | Restrict the runner agent to the use of a private IP address. If `runner_agent_uses_private_address` is set to `false` it will override the `runners_use_private_address` for the agent. | `bool` | `true` | no |
434435
| <a name="input_runner_ami_filter"></a> [runner\_ami\_filter](#input\_runner\_ami\_filter) | List of maps used to create the AMI filter for the Gitlab runner docker-machine AMI. | `map(list(string))` | <pre>{<br> "name": [<br> "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"<br> ]<br>}</pre> | no |

‎main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ locals {
131131
bucket_name = local.bucket_name
132132
shared_cache = var.cache_shared
133133
sentry_dsn = var.sentry_dsn
134-
gitlab_runner_major_version = tonumber(split(".", var.gitlab_runner_version)[0])
134+
prometheus_listen_address = var.prometheus_listen_address
135135
auth_type = var.auth_type_cache_sr
136136
}
137137
)

‎template/runner-config.tpl

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ concurrent = ${runners_concurrent}
22
check_interval = ${runners_check_interval}
33
sentry_dsn = "${sentry_dsn}"
44
log_format = "json"
5+
listen_address = "${prometheus_listen_address}"
56

67
[[runners]]
78
name = "${runners_name}"

‎variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,12 @@ variable "sentry_dsn" {
710710
type = string
711711
}
712712

713+
variable "prometheus_listen_address" {
714+
default = ""
715+
description = "Defines an address (<host>:<port>) the Prometheus metrics HTTP server should listen on."
716+
type = string
717+
}
718+
713719
variable "docker_machine_egress_rules" {
714720
description = "List of egress rules for the docker-machine instance(s)."
715721
type = list(object({

0 commit comments

Comments
 (0)
Please sign in to comment.