|
1 | 1 | # Workflow Executors
|
2 | 2 |
|
3 |
| -A workflow executor is a process that conforms to a specific interface that allows Argo to perform certain actions like monitoring pod logs, collecting artifacts, managing container life-cycles, etc. |
| 3 | +A Workflow executor runs in the Pods that execute your workloads. |
| 4 | +It runs as both an init container and as a sidecar to the container you specify. |
| 5 | +It allows Argo to perform certain actions like monitoring Pod logs, providing and collecting artifacts, and managing container life-cycles. |
4 | 6 |
|
5 |
| -## Emissary (emissary) |
| 7 | +Historically there were multiple available executor types, but as of 3.4 the only available executor is called `emissary`. |
6 | 8 |
|
7 |
| -> v3.1 and after |
8 |
| -
|
9 |
| -Default in >= v3.3. |
10 |
| -Only option in >= v3.4. |
11 |
| - |
12 |
| -This is the most fully featured executor. |
| 9 | +## Emissary Executor |
13 | 10 |
|
14 | 11 | * Reliability:
|
15 | 12 | * Works on GKE Autopilot
|
16 |
| - * Does not require `init` process to kill sub-processes. |
17 |
| -* More secure: |
| 13 | + * Does not require `init` process to kill sub-processes |
| 14 | +* Security: |
18 | 15 | * No `privileged` access
|
19 | 16 | * Cannot escape the privileges of the pod's service account
|
20 |
| - * Can [`runAsNonRoot`](workflow-pod-security-context.md). |
21 |
| -* Scalable: |
22 |
| - * It reads and writes to and from the container's disk and typically does not use any network APIs unless resource |
23 |
| - type template is used. |
| 17 | + * Supports [running as non-root](workflow-pod-security-context.md) |
| 18 | +* Scalability: |
| 19 | + * Reads and writes to and from the container's disk |
| 20 | + * Typically does not use network APIs unless resource type template is used |
24 | 21 | * Artifacts:
|
25 |
| - * Output artifacts can be located on the base layer (e.g. `/tmp`). |
26 |
| -* Configuration: |
27 |
| - * `command` should be specified for containers. |
| 22 | + * Output artifacts can be located on the base layer (e.g. `/tmp`) |
| 23 | + |
| 24 | +### Container Command |
28 | 25 |
|
29 |
| -You can determine values as follows: |
| 26 | +You can determine the default command for a container image using: |
30 | 27 |
|
31 | 28 | ```bash
|
32 |
| -docker image inspect -f '{{.Config.Entrypoint}} {{.Config.Cmd}}' argoproj/argosay:v2 |
| 29 | +docker pull alpine:latest |
| 30 | +docker image inspect -f '{{.Config.Entrypoint}} {{.Config.Cmd}}' alpine:latest |
33 | 31 | ```
|
34 | 32 |
|
35 | 33 | [Learn more about command and args](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes)
|
36 | 34 |
|
37 | 35 | ### Image Index/Cache
|
38 | 36 |
|
39 |
| -If you don't provide command to run, the emissary will grab it from container image. You can also specify it using the workflow spec or emissary will look it up in the **image index**. This is nothing more fancy than |
40 |
| -a [configuration item](workflow-controller-configmap.yaml). |
| 37 | +The emissary executor determines the command to run in this order: |
| 38 | + |
| 39 | +1. Command specified in the workflow spec |
| 40 | +2. Command from the image index cache |
| 41 | +3. Command from the container image |
| 42 | + |
| 43 | +The image index is a [configuration item](workflow-controller-configmap.yaml), called `images`. |
41 | 44 |
|
42 |
| -Emissary will create a cache entry, using image with version as key and command as value, and it will reuse it for specific image/version. |
| 45 | +The controller creates a cache entry using the image with version as key and command as value. |
| 46 | +It reuses this cache for specific image:version combinations, so you may get surprising behavior if you update the command in an image without changing its version tag. |
43 | 47 |
|
44 |
| -### Exit Code 64 |
| 48 | +### Troubleshooting |
45 | 49 |
|
46 |
| -The emissary will exit with code 64 if it fails. This may indicate a bug in the emissary. |
| 50 | +The emissary will exit with code 64 if it fails. |
| 51 | +This may indicate a bug in the emissary. |
0 commit comments