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

[wip] Document commands implemented by odo for now #6784

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions docs/proposals/commands-semantic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Semantic of commands

Components:
- container
- cluster resource (Kubernetes/OpenShift)
- volume
- image

| Command | PreStart | PostStart | PreStop | PostStop |
|-----------------------------|----------|-----------|---------|-----------|
| exec on container | | Y(1) | Y(1) | |
| exec on cluster resource | N/A | N/A | N/A | N/A |
| exec on volume | N/A | N/A | N/A | N/A |
| exec on image | N/A | N/A | N/A | N/A |
|   | | | | |
| apply on container | ? | ? | ? | ? |
| apply on cluster resource | | 0 | | |
| apply on volume | ? | ? | ? | ? |
| apply on image | | 0 | | |
|   | | | | |
| composite serial | | | | |
| composite parallel | | | | |


| Command | Build | Run/Debug | Deploy |
|-----------------------------|-------|-----------|--------|
| exec on container | Y(1) | Y(2) | Y(3) |
| exec on cluster resource | N/A | N/A | N/A |
| exec on volume | N/A | N/A | N/A |
| exec on image | N/A | N/A | N/A |
|   | | | |
| apply on container | ? | ? | ? |
| apply on cluster resource | 0 | Y(2) | Y(3) |
| apply on volume | ? | ? | ? |
| apply on image | 0 | Y(2) | Y(3) |
|   | | | |
| composite serial | | | |
| composite parallel | | | |


Legend:

- 0: Supported by handler but not implemented
- Y: Implemented
- N/A: Not applicable (by spec)
- ?: Spec is not clear

- (1) Implemented by pkg/component.NewExecHandler
- ApplyImage -> nil
- ApplyKubernetes -> nil
- ApplyOpenShift -> nil
- Execute -> (specific, calling execClient.ExecuteCommand on existing component)

- (2) Implemented by pkg/dev/kubedev.runHandler / pkg.dev/podmandev.commandHandler
- ApplyImage -> image.BuildPushSpecificImage / image.BuildPushSpecificImage
- ApplyKubernetes -> component.ApplyKubernetes / nil (not possible)
- ApplyOpenShift -> component.ApplyKubernetes / nil (not possible)
- Execute -> component.ExecuteRunCommand / component.ExecuteRunCommand

- (3) Implemented by pkg/deploy.deployHandler
- ApplyImage -> image.BuildPushSpecificImage
- ApplyKubernetes -> component.ApplyKubernetes
- ApplyOpenShift -> component.ApplyKubernetes
- Execute -> (specific, creating a job)