Skip to content

feat: Add option to specify prometheus metrics listen address #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 16, 2022
Merged
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ terraform destroy
| <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 |
| <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 |
| <a name="input_permissions_boundary"></a> [permissions\_boundary](#input\_permissions\_boundary) | Name of permissions boundary policy to attach to AWS IAM roles | `string` | `""` | no |
| <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 |
| <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 |
| <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 |
| <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 |
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ locals {
bucket_name = local.bucket_name
shared_cache = var.cache_shared
sentry_dsn = var.sentry_dsn
gitlab_runner_major_version = tonumber(split(".", var.gitlab_runner_version)[0])
prometheus_listen_address = var.prometheus_listen_address
auth_type = var.auth_type_cache_sr
}
)
Expand Down
1 change: 1 addition & 0 deletions template/runner-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ concurrent = ${runners_concurrent}
check_interval = ${runners_check_interval}
sentry_dsn = "${sentry_dsn}"
log_format = "json"
listen_address = "${prometheus_listen_address}"

[[runners]]
name = "${runners_name}"
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,12 @@ variable "sentry_dsn" {
type = string
}

variable "prometheus_listen_address" {
default = ""
description = "Defines an address (<host>:<port>) the Prometheus metrics HTTP server should listen on."
type = string
}

variable "docker_machine_egress_rules" {
description = "List of egress rules for the docker-machine instance(s)."
type = list(object({
Expand Down