You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/separate-standalone-driver/README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,6 +196,21 @@ The sample of the Argo Workflow system-container-driver template based on plugin
196
196
jsonPath: $.condition
197
197
```
198
198
199
+
## Test Plan
200
+
[x] I/we understand the owners of the involved components may require updates to existing tests to make this code solid enough prior to committing the changes necessary to implement this enhancement.
201
+
202
+
Unit Tests
203
+
Unit tests will primarily validate the compilation from KFP pipelines to Argo Workflow specs, while most other logic will be covered by integration tests.
204
+
205
+
Integration tests
206
+
Add an additional E2E test to verify the behavior of the global driver server.
207
+
208
+
Additionally, it is nice to have end-to-end (E2E) tests to verify basic functionality. Existing tests should be reused if available. The E2E tests should cover at least the following scenarios:
209
+
- A simple pipeline with a single component, waiting for successful completion of the run.
210
+
- A pipeline with a chain of components passing inputs and outputs between them, waiting for successful completion of the run.
211
+
- A pipeline designed to fail, waiting for the run to end with an error.
212
+
- A pipeline which fails but has retries enabled(pipeline/ and component level), waiting for the run to complete successfully.
213
+
199
214
## Conclusion
200
215
This proposal introduces an optimization for Kubeflow Pipelines (KFP) that replaces per-task driver pods with a lightweight standalone service based on Argo Workflows’ Executor Plugin mechanism. It significantly reduces pipeline task startup time by eliminating the overhead of scheduling a separate driver pod for each task — particularly beneficial for large pipelines with multiple steps and caching enabled.
201
216
Instead of launching a new driver pod per task, the driver logic is offloaded to a shared agent pod that is scheduled per workflow, and completes once the workflow ends. This reduces latency in cache lookups and metadata initialization.
Copy file name to clipboardExpand all lines: proposals/separate-standalone-driver/plugin.md
+8-58Lines changed: 8 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,10 @@ As a result, driver-plugin implementations should merely act as a proxy between
15
15
16
16
1. Implement the driver plugin that simply proxies requests from the workflow controller to the kfp-driver-server and back.
17
17
2. Build the image for the driver plugin.
18
-
3. Create the [yaml description](src/driver-plugin/plugin.yaml) of the plugin
18
+
3. Create the [yaml description](plugin.yaml) of the plugin
19
19
4.[Create](https://argo-workflows.readthedocs.io/en/latest/cli/argo_executor-plugin_build/) the configmap by executing ```argo executor-plugin build .``` in the yaml description folder from the step 3
20
20
5. Apply the created ConfigMap to the workflow-controller Kubernetes namespace.
21
+
6. Create the service account driver-plugin-executor-plugin and set automountServiceAccountToken: true in the sidecar plugin ConfigMap (required for Kubernetes API access; see details below).
21
22
22
23
After that, you will be able to reference the corresponding driver plugin in your Argo Workflow using:
23
24
```yaml
@@ -26,61 +27,10 @@ plugin:
26
27
...
27
28
```
28
29
29
-
### Problem: Interaction With the Kubernetes API From a Sidecar Container
30
+
### Interaction With the Kubernetes API From a Sidecar Container
30
31
The driver [requires](https://github.com/kubeflow/pipelines/blob/master/backend/src/v2/driver/k8s.go#L68) access to the k8s API.
31
-
However, the required volume with the service account secret (/var/run/secrets/kubernetes.io/serviceaccount) is mounted only into the main (driver) container, but not into the sidecar container.
32
-
Below is a sample YAML snippet showing the container definitions in the agent pod.
/etc/gitconfig from gitconfig (ro,path="gitconfig")
83
-
/var/run/argo from var-run-argo (rw)
84
-
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-z9nt6 (ro)
85
-
```
86
-
As a workaround, it makes sense to use the agent pod only as a proxy to the kfp-driver-server.
32
+
However, by default, the Argo Workflow Controller does not mount the service account token in the executor plugin's sidecar container. Moreover, it [disabled](https://github.com/argoproj/argo-workflows/pull/8028) the ability to mount the Workflow's service account to the executor plugin.
33
+
As a result, to enable access to the Kubernetes API:
34
+
1. Create ServiceAccount in each profile namespace with the name `driver-plugin-executor-plugin`. Argo WF [expects](https://github.com/argoproj/argo-workflows/blob/main/workflow/controller/agent.go#L285) the format <plugin-name>-executor-plugin
35
+
2. Add a Role with appropriate Kubernetes API access and bind it to the service account.
36
+
3. Configure `sidecar.automountServiceAccountToken` see [example](plugin.yaml)
0 commit comments