-
Notifications
You must be signed in to change notification settings - Fork 35
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 analysis providers. #599
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
priority/normal
Higher priority than priority/minor. Nice to have.
size/XL
Denotes a PR that changes 500-999 lines, ignoring generated files.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Comments
konveyor-ci-bot
bot
added
the
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
label
Feb 8, 2024
This issue is currently awaiting triage. |
konveyor-ci-bot
bot
added
needs-kind
Indicates an issue or PR lacks a `kind/foo` label and requires one.
needs-priority
Indicates an issue or PR lacks a `priority/foo` label and requires one.
labels
Feb 8, 2024
jortel
added
kind/feature
Categorizes issue or PR as related to a new feature.
and removed
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
needs-kind
Indicates an issue or PR lacks a `kind/foo` label and requires one.
needs-priority
Indicates an issue or PR lacks a `priority/foo` label and requires one.
labels
Feb 12, 2024
konveyor-ci-bot
bot
added
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
needs-priority
Indicates an issue or PR lacks a `priority/foo` label and requires one.
labels
Feb 12, 2024
jortel
added
priority/major
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
priority/normal
Higher priority than priority/minor. Nice to have.
and removed
priority/major
Important over the long term, but may not be staffed and/or may need multiple releases to complete.
labels
Feb 15, 2024
konveyor-ci-bot
bot
removed
the
needs-priority
Indicates an issue or PR lacks a `priority/foo` label and requires one.
label
Feb 15, 2024
dymurray
added
the
size/XL
Denotes a PR that changes 500-999 lines, ignoring generated files.
label
May 6, 2024
jortel
added
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
and removed
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
labels
Jun 6, 2024
jortel
added a commit
that referenced
this issue
Jun 6, 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:<pool>} 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 --------- Signed-off-by: Jeff Ortel <jortel@redhat.com>
jortel
added a commit
to konveyor/tackle2-addon-analyzer
that referenced
this issue
Jun 6, 2024
ref: konveyor/tackle2-hub#599 Signed-off-by: Jeff Ortel <jortel@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
priority/normal
Higher priority than priority/minor. Nice to have.
size/XL
Denotes a PR that changes 500-999 lines, ignoring generated files.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
Problem
Currently: Each addon defines a single container.
Currently: analysis is performed by running a task that specifies the
tackle2-addon-analyzer
addon. The name of the addon is hard-coded in the UI. This addon image incorporates support goland and Java providers.The analyzer images are being refactored and the analyzer image will no longer bundle language providers. Instead, each provider will be packaged as a separate image. To support this, addons will need to be defined multiple containers. A main container for the addon and additional (sidecar) containers (one for each provider).
Future features may require runtime selection of an addon based on the kind-of task and the kind-of subject (application|platform|...) the task is executed on.
Examples:
Questions/Assumptions:
language
tags? Yes.Solution
Support optional addon Extensions. Each extension is a (sidecar) container and most likely a service. For example: an RDBMS or LSP provider. All containers within a task pod are injected with the same items as the main addon contianer:
Both addon and extension selection may be either:
Selection
As selector uses Label-Selector syntax and supports the following:
Examples:
Java
selector: tag:Language=Java
Java or XML
selector: tag:Language=Java || tag:Language=XML
No language tag.
selector: ! tag:Language=
Java and Linux
selector: tag:Language=Java && tag:OperatingSystem=Linux
Addon & Extension CRs
New Extension CR (Spec):
Fields:
extension
- declares compatibility with addons.container
- defines the extension container.selector
- defines selector for inclusion in the addon task pod.metadata
- defines unstructured information.Changed Addon CR (Spec):
Fields:
kind
- declares compatibility with a kind of task.container
- defines the addon container.selector
- defines addon selector for task (kind).metadata
- defines unstructured information.schema
- FUTURE defines the Task.Data schema.For symmetry and completeness, the
metadata
field is added and the separate addon fields for the container are replaced with the entire k8s Container. This is mainly a general improvement while we're changing the CR.Example:
API
Task API resource changes:
Example:
Port Injection
The task manager will provide a set of injector (macros). Format: ${<macro}. Injector macros may be specified in the container.Spec:
Automatic port assignment will be supported using a sequence (generator) macro.
Format: ${seq:pool}.
Example:
Kinds of Tasks
A task (definition) defines a kind-of task which performs a specific action on a specific subject.
To prevent hard-coding tag names in the UI (anywhere), we may consider data-driven approaches.
Introducing named task (definitions) which represent a known kind-of task. Each (definition) defines the input schema and how an addon (that implements the task) may be selected. Addons (optionally) declare that they implement a kind-of task.
New Task CR:
Fields:
name
the kind-of task.dependencies
list of task names used to define execution dependency.data
- data object passed to the addon.schema
- FUTURE defines the Task.Data schema.Add
Task.Kind
which can be applied by the exiting task endpoints. Either kind OR addon and extensions may be specified but not both.Example:
Add a new read-only endpoints.
Task Priority
Tasks will be run in order of:
Pods are created with the appropriate PriorityClass to ensure node scheduling matches. Task dependencies will be escalated as needed to prevent priority inversion. When (dep) tasks are already scheduled (Pending), the pod will be recreated referencing the updated priority class.
When the nodes are saturated and task pods are phase=Pending, the task manager may reschedule (delete) task with lower priority in an effort for higher priority pods to be run by the node scheduler. PriorityClass preemption should handle this.
Addon (adaptor)
Environment (variable) Injection
To injecting container environment variables into the Extension.metadata.
The format is exactly like k8s environment variable: $(variable).
Example:
Analyzer Addon (adaptor)
delegated to: konveyor/tackle2-addon-analyzer#83
Resource Injector
Aggregate the initConfig fragments from each Extension.metadata.
Inject information into the initConfig.
Considering: To support this, a set of injectors will be provided to get, store hub REST resource (fields). Fetched resources are assigned to variables that may be used in the metadata.
Resource:
Example:
The text was updated successfully, but these errors were encountered: