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

Scale Jobs Natively (Without Admission Controllers) #71

Merged

Conversation

samuel-esp
Copy link
Collaborator

Motivation

This pull request gives the possibility to Scale Down Jobs Natively (Without Admission Controller). It will be possible using the same logic already implemented for CronJobs.

Important: Jobs started from CronJobs won't be scaled unless the user specifies both Jobs and CronJobs inside --include-resources (the check is made using ownerReferences )

Changes

Refactored the scale function inside scaler.py to distinguish between the two use cases (Scaling Jobs using an Admission Controller or Natively). Refactored get_replicas, scale_down, scale_up functions. Refactored documentations to further clarify both uses cases

Tests done

3 unit tests were added inside test_scaler.py. two of them for downscaling/upscaling jobs, the third one aims at the particular use case where the jobs is started from a cronjob (the scaling shouln't be triggered)

TODO

  • I've assigned myself to this PR

Copy link
Member

@JTaeuber JTaeuber left a comment

Choose a reason for hiding this comment

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

LGTM

@JTaeuber JTaeuber merged commit 9aa2078 into caas-team:main Jul 18, 2024
1 check passed
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.

3 participants