Skip to content

feat: expose health_check_type for runner manager ASG#1384

Open
lorenzstorm1 wants to merge 1 commit into
cattle-ops:mainfrom
lorenzstorm1:feat/manager-asg-health-check-type
Open

feat: expose health_check_type for runner manager ASG#1384
lorenzstorm1 wants to merge 1 commit into
cattle-ops:mainfrom
lorenzstorm1:feat/manager-asg-health-check-type

Conversation

@lorenzstorm1

Copy link
Copy Markdown

Summary

  • Adds health_check_type and health_check_grace_period to the runner_instance variable
  • Wires them into the aws_autoscaling_group.gitlab_runner_instance resource
  • Defaults unchanged: "EC2" health check type, 0 grace period

Motivation

The runner manager ASG uses EC2 health checks, which only detect hardware-level failures. OS-level freezes (OOM, kernel panic that doesn't trigger instance stop, EBS I/O stalls) leave the instance appearing healthy from the hypervisor's perspective while all userspace processes are dead.

With this change, users can attach a target group pointing at the gitlab-runner Prometheus endpoint (:9252/metrics) and set health_check_type = "ELB" to get automatic replacement of unresponsive manager instances.

Usage

runner_instance = {
  name              = "gitlab-runner"
  type              = "t4g.medium"
  health_check_type = "ELB"
  health_check_grace_period = 120
}

Combined with an ALB/NLB target group attached to the ASG.

Test plan

  • Verify terraform plan shows no changes when using defaults ("EC2", 0)
  • Verify setting health_check_type = "ELB" propagates to the ASG resource

🤖 Generated with Claude Code

…er manager ASG

The runner manager ASG currently hardcodes health_check_grace_period=0
and uses the default EC2 health check type. This means OS-level freezes
(where userspace hangs but EC2 status checks still pass) are not detected
by the ASG.

By exposing these fields, users can attach a target group with an
application-level health check (e.g. the gitlab-runner Prometheus endpoint
on port 9252) and set health_check_type="ELB" to enable automatic
replacement of unresponsive manager instances.

Defaults remain unchanged (EC2 health check, 0s grace period).
@github-actions

Copy link
Copy Markdown
Contributor

Hey @lorenzstorm1! 👋

Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process.

Make sure that this PR clearly explains:

  • the problem being solved
  • the best way a reviewer and you can test your changes

With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE.

The following ChatOps commands are supported:

  • /help: notifies a maintainer to help you out

Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command.

This message was generated automatically. You are welcome to improve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant