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

feat: kueue limitation to job #260

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

feat: kueue limitation to job #260

wants to merge 2 commits into from

Conversation

ambersun1234
Copy link
Contributor

@ambersun1234 ambersun1234 commented Nov 12, 2024

Summary by Sourcery

New Features:

  • Introduce Kueue configuration to manage job queuing within the application, allowing for the specification of cluster and local queue names and setting a limit on concurrent jobs.

@ambersun1234 ambersun1234 self-assigned this Nov 12, 2024
Copy link

sourcery-ai bot commented Nov 12, 2024

Reviewer's Guide by Sourcery

This PR implements Kueue functionality by adding configuration parameters and Kubernetes resources. The implementation includes defining a ClusterQueue, LocalQueue, and ResourceFlavor using Kueue's API, with configurable concurrent job limits and queue names.

Class diagram for Kueue configuration

classDiagram
    class Kueue {
        +bool enabled
        +string fullnameOverride
        +QueueName queueName
        +int concurrentJobs
    }
    class QueueName {
        +string cluster
        +string local
    }
    Kueue --> QueueName
Loading

File-Level Changes

Change Details Files
Added Kueue configuration parameters to values.yaml
  • Added enable flag for internal Kueue
  • Added configurable cluster and local queue names
  • Added concurrent jobs limit parameter (default: 100)
  • Added fullnameOverride parameter
charts/agh3/values.yaml
Implemented Kueue Kubernetes resources with conditional rendering
  • Created ClusterQueue resource with configurable concurrent jobs limit
  • Created LocalQueue resource linked to ClusterQueue
  • Added ResourceFlavor definition with default configuration
  • Added conditional rendering based on kueue.enabled flag
  • Applied consistent labeling using AGH3.labels template
charts/agh3/templates/kueue/kueue.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ambersun1234 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider publishing the Kueue chart to a proper chart repository instead of using a local file reference. This would improve maintainability and version management.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ambersun1234 ambersun1234 marked this pull request as draft November 13, 2024 06:15
@ambersun1234 ambersun1234 changed the title feat: add kueue chart feat: kueue limitation to job Dec 10, 2024
@ambersun1234 ambersun1234 marked this pull request as ready for review December 10, 2024 08:13
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ambersun1234 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider changing the default kueue.enabled to false to make this feature opt-in rather than opt-out
  • There's a typo in the parameter name 'cocurrentJobs' - should be 'concurrentJobs'
  • Please add documentation explaining the purpose of Kueue integration and guidelines for configuring the parameters (especially concurrentJobs)
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

charts/agh3/values.yaml Outdated Show resolved Hide resolved
## @section Kueue parameters
kueue:
## @param kueue.enabled Enable internal kueue
enabled: true
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be disabled by default until all refactoring is complete.

@ambersun1234 ambersun1234 requested a review from knowlet December 11, 2024 08:12
@ambersun1234 ambersun1234 force-pushed the feat/kueue branch 2 times, most recently from ebaf8e8 to c8b2829 Compare December 12, 2024 06:38
@ambersun1234 ambersun1234 marked this pull request as draft December 12, 2024 09:11
@ambersun1234
Copy link
Contributor Author

need to merge #273 before converting to ready

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