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

add support for all command types to events #5706

Closed
kadel opened this issue Apr 29, 2022 · 9 comments
Closed

add support for all command types to events #5706

kadel opened this issue Apr 29, 2022 · 9 comments
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/task Issue is actionable task lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@kadel
Copy link
Member

kadel commented Apr 29, 2022

currently the exec command is not supported in events

helm-install-postgresql should either map to an apply command or a composite command with apply commands
@kadel kadel added the area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. label Apr 29, 2022
@kadel kadel added this to the v3.0.0-beta2 milestone May 6, 2022
@kadel kadel added the kind/task Issue is actionable task label Jun 2, 2022
@kadel kadel added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jun 9, 2022
@kadel kadel removed this from the v3.0.0-beta2 milestone Jun 22, 2022
@kadel kadel added the priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). label Jul 18, 2022
@valaparthvi valaparthvi removed their assignment Nov 21, 2022
@rm3l rm3l added needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. and removed needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. labels Dec 12, 2022
@kadel
Copy link
Member Author

kadel commented Feb 17, 2023

There was a discussion with a user who would require this to use odo and devfile in their environment.

The discussed use-case is using #6549 they would mount secrets like SSL certificates into the container, and then using postStart they would execute command to import SSL certs

@valaparthvi
Copy link
Member

@kadel would you be able to provide a sample Devfile for this case?

@valaparthvi
Copy link
Member

Note: We need to figure this out for podman as well.

@valaparthvi valaparthvi added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Apr 18, 2023
@valaparthvi
Copy link
Member

valaparthvi commented Apr 27, 2023

preStart, postStop events can only be an apply command or a composition of apply command.
postStart, and preStop can only be an exec command or composite exec command.

The above are Devfile limitations.

// isEventValid checks if events belonging to a specific event type are valid ie;
// 1. event should map to a valid devfile command
// 2. preStart and postStop events should either map to an apply command or a composite command with apply commands
// 3. postStart and preStop events should either map to an exec command or a composite command with exec commands
func isEventValid(eventNames []string, eventType string, commandMap map[string]v1alpha2.Command) error {

Currently, odo only supports postStart, and preStop.

@valaparthvi
Copy link
Member

valaparthvi commented Apr 27, 2023

PreStart events:
odo does not support preStart yet.
Implement exec command as a Job. We wait for the job to complete, and if the job fails, the command fails. Every command will run in its own individual job. the command would be short running. How long should we wait? Print tip to run odo logs after a minute?

Implement apply command, build an image/create k8s/oc resources. For container components, if it is supported, simply create a Deployment. The command should be long running? We do not wait for the command to finish, move on once the deployment has been created.

Case of apply on container component with mountSources=true. How do we sync the sources?

Composite apply command: (container component) run every apply command separately.

Support composite exec and apply command.

First thing:

  • write a doc describing what we want to do for each step/type of event

@feloy
Copy link
Contributor

feloy commented May 25, 2023

AutoBuild and DeployByDefault on components can be used to work as Apply *Start events

@feloy feloy removed priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. epic/5834-spec labels May 25, 2023
@feloy
Copy link
Contributor

feloy commented May 30, 2023

Moving this issue out of the Epic #5834

@github-actions
Copy link
Contributor

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 30, 2023
Copy link
Contributor

This issue was closed because it has been inactive for 30 days since being marked as stale.

@github-actions github-actions bot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Nov 30, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. kind/task Issue is actionable task lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
Archived in project
Development

No branches or pull requests

4 participants