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: action crd yaml #282

Draft
wants to merge 3 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 update the action CRD YAML.

New Features:

  • Introduce Kueue for managing job queues.

Tests:

  • Remove trigger run and trigger stop from the action CRD.

Copy link

sourcery-ai bot commented Jan 9, 2025

Reviewer's Guide by Sourcery

This pull request introduces the implementation of a Kubernetes Custom Resource Definition (CRD) for actions. It includes changes to the Helm chart to support the CRD and integrates Kueue for job queue management.

Entity Relationship diagram for RabbitMQ configuration

erDiagram
    USER ||--o{ PERMISSION : has
    USER ||--o{ QUEUE : manages
    VHOST ||--o{ PERMISSION : contains
    VHOST ||--o{ QUEUE : contains

    USER {
        string name
        string password
        string tags
    }
    PERMISSION {
        string user
        string vhost
        string configure
        string write
        string read
    }
    QUEUE {
        string name
        string vhost
        boolean durable
        boolean auto_delete
    }
    VHOST {
        string name
    }
Loading

Class diagram for Action CRD structure

classDiagram
    class Action {
        +ObjectMeta metadata
        +ActionSpec spec
        +ActionStatus status
    }

    class ActionSpec {
        +Container[] containers
        +string historyID
        +boolean isRoot
    }

    class ActionStatus {
        +string state
    }

    Action *-- ActionSpec
    Action *-- ActionStatus

    note for Action "Custom Resource Definition for managing actions"
    note for ActionSpec "Removed trigerRun and trigerStop fields"
Loading

File-Level Changes

Change Details Files
Added a CRD definition for actions.
  • Defined the schema for the action CRD.
  • Removed trigger fields from the action CRD spec.
  • Added required fields for containers and historyID to the action CRD spec.
charts/agh3/crds/v1-actions.crds.yaml
Integrated Kueue for managing job queues.
  • Added a Kueue configuration to the Helm chart.
  • Added parameters for enabling Kueue, queue names, and concurrent jobs.
  • Set the KUEUE_NAME environment variable in the controller deployment.
charts/agh3/templates/kueue/kueue.yml
charts/agh3/values.yaml
charts/agh3/templates/controller/controller-deployment.yml
Added support for loading RabbitMQ user and queue definitions from a secret.
  • Added load_definition.json to the rabbitmq-secret.
  • Added configuration parameters for enabling load definition and specifying the secret name.
charts/agh3/templates/base/rabbitmq-secret.yml
charts/agh3/values.yaml
Updated the controller and captain deployments to use the new RabbitMQ queue.
  • Set the RABBITMQ_QUEUE environment variable in the controller and captain deployments.
  • Added a parameter for specifying the RabbitMQ queue name.
charts/agh3/templates/controller/controller-deployment.yml
charts/agh3/templates/captain/captain-deployment.yml
charts/agh3/values.yaml
Removed liveness probe from controller deployment.
  • Removed the liveness probe configuration from the controller deployment.
charts/agh3/templates/controller/controller-deployment.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

@ambersun1234 ambersun1234 force-pushed the feat/AGH-34/action-crd-yaml branch from b684bff to 35e128e Compare January 9, 2025 09:57
@ambersun1234
Copy link
Contributor Author

pending for #260

@ambersun1234 ambersun1234 force-pushed the feat/AGH-34/action-crd-yaml branch from 35e128e to 89f7cb5 Compare January 9, 2025 11:06
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