furiko-io / furiko

Kubernetes cron and batch job platform
https://furiko.io
Apache License 2.0
478 stars 21 forks source link

feat(taskexecutor): Implement Argo Workflows task executor #100

Open irvinlim opened 2 years ago

irvinlim commented 2 years ago

Implements a new task executor: Argo Workflows.

Currently, the task executor is very simple:

  1. One task = one Workflow. This means that retries (at Furiko level) will create a new Workflow, and parallelism (at Furiko level) will have multiple concurrent Workflows.
  2. Most task fields would have an equivalent meaning in Argo Workflows.
    • RunningTimestamp: workflow.status.startedAt (will be set once non-pending)
    • FinishTimestamp: workflow.status.finishedAt
  3. Substitution only occurs in .spec.arguments.parameters.*.value. This avoids conflicting with Argo's own substitution mechanism.
  4. If the Argo Workflow CRD is not installed, Furiko will not watch or support the argoWorkflow task executor. If it is installed or uninstalled, currently it would require a restart of execution-controller to take effect, because we need to reinitialize the informers.
    • Users can still create JobConfigs with argoWorkflow task executor, but a warning will be returned by the admission webhook.
    • When trying to run a new Job with the argoWorkflow task executor, AdmissionRefused will be thrown if it cannot be created because the CRD is not installed.
codecov[bot] commented 2 years ago

Codecov Report

Merging #100 (062e447) into main (5ad6ccc) will decrease coverage by 0.25%. The diff coverage is 61.31%.

@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
- Coverage   63.50%   63.25%   -0.26%     
==========================================
  Files         205      217      +12     
  Lines       10958    11358     +400     
==========================================
+ Hits         6959     7184     +225     
- Misses       3621     3789     +168     
- Partials      378      385       +7     
Impacted Files Coverage Δ
apis/execution/v1alpha1/job_types.go 100.00% <ø> (ø)
apis/execution/v1alpha1/task_types.go 100.00% <ø> (ø)
cmd/execution-controller/main.go 0.00% <ø> (ø)
cmd/execution-webhook/main.go 0.00% <ø> (ø)
...tion/controllers/jobconfigcontroller/controller.go 32.30% <ø> (-2.99%) :arrow_down:
...kg/execution/controllers/jobcontroller/informer.go 0.00% <0.00%> (ø)
...ecution/taskexecutor/podtaskexecutor/pod_lister.go 85.00% <ø> (+4.35%) :arrow_up:
pkg/runtime/controllercontext/context.go 0.00% <0.00%> (ø)
...kg/runtime/controllercontext/context_clientsets.go 0.00% <0.00%> (ø)
pkg/runtime/controllercontext/context_crds.go 0.00% <0.00%> (ø)
... and 42 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.