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: controller healthz #283

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

Conversation

ambersun1234
Copy link
Contributor

@ambersun1234 ambersun1234 commented Jan 9, 2025

Summary by Sourcery

Add support for Kueue and implement controller health checks.

New Features:

  • Introduce Kueue for managing job queues.

Tests:

  • Implement health checks for the controller.

Copy link

sourcery-ai bot commented Jan 9, 2025

Reviewer's Guide by Sourcery

This pull request implements a health check endpoint for the controller and introduces Kueue for managing job queues.

Entity relationship diagram for RabbitMQ configuration

erDiagram
    USER ||--o{ PERMISSIONS : has
    USER {
        string name
        string password
        string tags
    }
    QUEUE {
        string name
        string vhost
        boolean durable
        boolean auto_delete
    }
    VHOST ||--o{ PERMISSIONS : contains
    VHOST {
        string name
    }
    PERMISSIONS {
        string user
        string vhost
        string configure
        string write
        string read
    }
Loading

Class diagram for Kueue resources

classDiagram
    class ClusterQueue {
        +String name
        +namespaceSelector
        +resourceGroups[]
    }
    class LocalQueue {
        +String name
        +String clusterQueue
    }
    class ResourceFlavor {
        +String name
    }
    class ResourceGroup {
        +String[] coveredResources
        +Flavor[] flavors
    }
    class Flavor {
        +String name
        +Resource[] resources
    }
    ClusterQueue --> ResourceGroup
    ResourceGroup --> Flavor
    LocalQueue --> ClusterQueue
Loading

File-Level Changes

Change Details Files
Added health check endpoint to the controller
  • Added command line argument --health-probe-bind-address=:8081 to the controller container.
  • Updated the liveness probe to use port 8081 and the /mq_health_check path.
  • Added a parameter to the values file to enable setting the queue name for Kueue.
  • Added a parameter to the values file to enable setting the number of concurrent jobs for Kueue.
charts/agh3/templates/controller/controller-deployment.yml
Introduced Kueue for managing job queues
  • Added configuration parameters for Kueue in the values file.
  • Created Kueue resources (ClusterQueue, LocalQueue, ResourceFlavor) in a new template file.
  • Added Kueue to Chart.lock
charts/agh3/values.yaml
charts/agh3/templates/kueue/kueue.yml
charts/agh3/Chart.lock
Added load definition to RabbitMQ secret
  • Added load_definition.json to the RabbitMQ secret to define users, queues, vhosts, and permissions.
  • Added configuration parameters for the load definition in the values file.
  • Added queue name configuration to values file and reference it in captain and controller deployments
charts/agh3/templates/base/rabbitmq-secret.yml
charts/agh3/values.yaml
Removed trigger run and trigger stop from CRD
  • Removed trigerRun and trigerStop fields from the action CRD specification.
charts/agh3/crds/v1-actions.crds.yaml

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

@ambersun1234
Copy link
Contributor Author

pending for #282

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.

1 participant