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

✨ Support multiple provider in separate containers. #606

Merged
merged 6 commits into from
Jun 6, 2024

Conversation

jortel
Copy link
Contributor

@jortel jortel commented Feb 23, 2024

Support dynamic selection of multiple providers in separate containers.

closes #599

Summary by package:

  • /addon
    • add support for addons to fetch the Addon using the binding through the addon (adapter) package.
    • add environment variables injector. replaces $(var) with values.
  • /api
    • addon
      • support changes in addon and extension CRs.
      • included (new) extensions in Addon resource.
    • task
      • removed unused fields: variant, purged.
      • support new addon and extensions fields.
      • resolve k8s resources referenced by task: addon, extension, task, priority for validation and default priority.
    • taskgroup - support changes in task.
    • delegate CRUD (including cancel) to the task manager. This ensure:
      • tasks in flight are not updated by multiple threads.
      • delegates complexities on what can be updated when to the task manger.
  • /binding - add support for reading Get, List addons.
  • generated/crd - result of: (make generate && make manifests)
  • /k8s/api -
    • addon - updated to support dynamic addon selection.
    • task - added to support dynamic addon selection.
    • extension - added to support extensions with dynamic selection.
  • /migration/v13 - core.go updated.
    • Task.kind added.
    • Task.Extensions added.
    • Task.Attached added to support attached pod definition and container logs.
    • Task.Policy structured TaskPolicy. which includes preemption policies. Structured improved the api.
  • /model - ref migration v13.
  • /reaper
    • reap files attached to tasks.
    • report released event.
  • /settings - add hub setting for location of /shared (emptydir).
  • /task - support:
    • converted task models to use json serializer (while adding other json fields).
    • multi-container task pods which ensured extension container termination.
    • both static and dynamic addon seletion.
    • both static and dynamic extension selection.
    • task (kinds)
    • priority escalation based on task-kind dependencies. Prevents priority inversions.
    • task preemption based on priority.
    • enhanced ordering based on task-kind dependency. adds task Postponed rule.
    • attach pod.yaml (including events) and container logs to the task on pod completion.
    • support resource quota.
    • add environment variable injection (mainly to support automatic port assignment for providers).
    • add ${seq:} macro (mainly to support automatic port assignment for providers).
    • add task event reporting.
    • refactored the manager:
      • task state simplified: pending state removed (reported by event).
      • consolidate errors into error.go and add soft error concept.
      • Manager.runReady() into separate methods for better decomposition. each loop through and acts on the list.
      • Manager.updateRunning() into separate methods for better functional decomposition.
      • fetch all k8s resources at once instead of hammering the api-server.

json serialization: added a custom json (model) serializer. This was needed because we need the serializer to
handle the map[any]any problem with binding yaml. Removed api/base.go/strMap() and moved it to the new serializer. Only being used by tasks.


Added/Updated CRDs:

  • Addon (updated)
  • Extension
  • Task

@jortel jortel force-pushed the provider branch 2 times, most recently from f77a118 to a6db2dc Compare March 29, 2024 12:54
@jortel jortel changed the title Provider ✨ Support multiple provider in separate containers. Mar 29, 2024
@jortel jortel marked this pull request as ready for review March 29, 2024 12:57
@jortel jortel requested a review from mansam April 3, 2024 12:38
api/task.go Outdated Show resolved Hide resolved
api/task.go Outdated Show resolved Hide resolved
api/task.go Show resolved Hide resolved
@mansam
Copy link
Collaborator

mansam commented May 30, 2024

  • Adjust Task priority to sort by priority and then by age (id)
  • Assert existence of files/set status code in api.TaskHandler.GetAttached
  • Adjust TaskGroup to delegate to task manager, refactor task manager CRUD methods to accept DB/tx handle, add Transaction decorator to Task route group

@jortel
Copy link
Contributor Author

jortel commented May 30, 2024

Fixed:

Copy link
Collaborator

@mansam mansam left a comment

Choose a reason for hiding this comment

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

LGTM

@jortel jortel force-pushed the provider branch 2 times, most recently from 136b204 to a79b9b2 Compare May 31, 2024 14:46
jortel added 5 commits May 31, 2024 08:49
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
…ocked send on timeout.

Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Jeff Ortel <jortel@redhat.com>
Copy link
Collaborator

@mansam mansam left a comment

Choose a reason for hiding this comment

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

Revisions LGTM

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.

✨ Support analysis providers.
2 participants