ephemeralrunner should support a TTL

Đang mở
#4,100 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions, go, kubernetes
Lĩnh vực
ci-cd, devops, infrastructure

Hướng nghiên cứu

Bắt đầu trong controllers/actions.github.com/ephemeralrunner_controller.go, khoảng dòng 190–198, sau đó theo dõi cách các tài nguyên EphemeralRunner và pod được tạo và dọn dẹp. Xác định cách một giá trị TimeToLive phải làm hết hạn cả pod và EphemeralRunner mà không làm cạn điều kiện retry hiện có; được xem là hoàn thành khi tài nguyên được thay thế hoặc xóa đúng cách sau TTL và các runner vẫn khả dụng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

community enhancement needs triage
What would you like added?

It would be nice if the ephemeral runners supported a TimeToLive value to cleanly expire the pod & ephemeral runners.

Why is this needed?

I have an ephemeralrunner setup defined via gha-runner-scale-set. I have minRunners set, and when the runners startup they connect to GHE and wait for work. Part of my pod spec includes a custom volume that I need to "keep fresh" by rotating every 2 hours. (The volume is time consuming to setup, and our volume provisioner abstracts that time). We installed a liveness probe on the pod to expire after 2 hours, and this works up to a max of 5 times due to this code:

https://github.com/actions/actions-runner-controller/blob/1dbb88cb9ee8fcfc4c28406e5d0b910d8a4419cc/controllers/actions.github.com/ephemeralrunner_controller.go#L190-L198

After hitting that condition, the ephemeralrunner resource hangs around with no new pod and eventually (after ~10 hours of idle time) all ephemeralrunners have no running pods (meaning we lose all our GH Runners).

Ngôn ngữ chính
Go
Star
6.7k
Fork
1.5k
Merge trung bình
1 giờ 34 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của actions/actions-runner-controller

Tất cả issue của actions/actions-runner-controller

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.