Skip to content
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

fix: scale old runners only #65

Merged
merged 8 commits into from
Jan 23, 2024

Conversation

bavarianbidi
Copy link
Member

@bavarianbidi bavarianbidi commented Jan 10, 2024

TODOs:

  • probably remove pool.Status.Runners
  • improve pool deletion
  • get rid of orphaned funcs
  • document the scaling feature in general
    • draw a picture or reference/create a table to visualize it more better - maybe reference to a test

@bavarianbidi bavarianbidi force-pushed the pool-scaling/delete_long_running_idle_runners branch 2 times, most recently from 347b54a to 6b3f41d Compare January 11, 2024 20:50
@bavarianbidi bavarianbidi force-pushed the pool-scaling/delete_long_running_idle_runners branch 2 times, most recently from 75b1bff to 2bd7e2c Compare January 23, 2024 09:17
@bavarianbidi bavarianbidi marked this pull request as ready for review January 23, 2024 09:17
Comment on lines +55 to +61
- `minIdleRunners` (on the `pool.spec`): defines the new value for `minIdleRunners`
- `minIdleRunnersAge` ([configured on the `operator` itself](config/configuration-parsing.md)): defines the age of the idle runners which should be removed

If the `minIdleRunnersAge` is set to `5m` and we scale down from `6` to `4`, `garm-operator` will only delete idle runners which are older than `5m`.

> [!IMPORTANT]
> The intention behind this approach was to prevent the deletion of to many idle runners as garm itself is responsible for the lifecycle of a runners in a pool.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently plan to move the minIdleRunnersAge into the pool.Spec in one of the future releases to make it configurable per pool

@bavarianbidi bavarianbidi force-pushed the pool-scaling/delete_long_running_idle_runners branch from 0bc246c to b38bd34 Compare January 23, 2024 10:40
@rafalgalaw rafalgalaw self-requested a review January 23, 2024 10:40
@bavarianbidi bavarianbidi merged commit 1334d0e into main Jan 23, 2024
3 checks passed
@bavarianbidi bavarianbidi deleted the pool-scaling/delete_long_running_idle_runners branch January 23, 2024 10:42
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.

2 participants