scality / runner-manager

Service to manage github Actions self-hosted runners
https://scality.github.io/runner-manager/
Apache License 2.0
7 stars 9 forks source link

aws: add support for instance profiles #576

Closed harryfinbow closed 5 months ago

harryfinbow commented 6 months ago

Currently there is no way of assigning IAM roles to runner instances at creation time. This PR adds an additional field in the AWS backend which creates EC2 instances with the specified IamInstanceProfile, configurable by the iam_instance_profile_arn field in the runner-manager.yaml config.

This implementation only accepts instances profiles by their ARN and not by their name to keep the implementation as simple as possible.

codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.81%. Comparing base (b4c1186) to head (027ae5d). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #576 +/- ## ========================================== + Coverage 85.79% 85.81% +0.02% ========================================== Files 31 31 Lines 1218 1220 +2 ========================================== + Hits 1045 1047 +2 Misses 173 173 ``` | [Flag](https://app.codecov.io/gh/scality/runner-manager/pull/576/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scality) | Coverage Δ | | |---|---|---| | [api](https://app.codecov.io/gh/scality/runner-manager/pull/576/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scality) | `66.96% <50.00%> (-0.03%)` | :arrow_down: | | [unit](https://app.codecov.io/gh/scality/runner-manager/pull/576/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scality) | `70.81% <100.00%> (+0.04%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scality#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

harryfinbow commented 6 months ago

LGTM, I see some linting stuff to be fixed let me know if they need some attention on my end.

I think I have fixed the linting issues (I had forgotten to run trunk check before submitting this PR) so hopefully a re-run of the checks should be all good