https://github.com/iomonad/argoj
Data-Oriented, Clojure API wrapper for Kubernetes Argo Workflow Engine
https://github.com/iomonad/argoj
argo argo-workflows clojure-library
Last synced: 3 months ago
JSON representation
Data-Oriented, Clojure API wrapper for Kubernetes Argo Workflow Engine
- Host: GitHub
- URL: https://github.com/iomonad/argoj
- Owner: iomonad
- License: other
- Created: 2023-02-28T09:25:16.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-23T19:40:18.000Z (over 2 years ago)
- Last Synced: 2025-06-10T11:09:53.035Z (4 months ago)
- Topics: argo, argo-workflows, clojure-library
- Language: Clojure
- Homepage: https://iomonad.github.io/argoj/
- Size: 184 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# argoj [](https://github.com/iomonad/argoj/actions/workflows/clojure.yml) [](https://github.com/iomonad/argoj/actions/workflows/release.yml) [](https://clojars.org/io.trosa/argoj)
## Abstract
> Data-Oriented, pure Clojure API wrapper for Argo Workflow, an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes.
## OpenAPI Stub
Generate OpenAPI stubs for latest version with script:
```bash
/bin/zsh bin/openapi-generate
```## API Usage
### Client Creation
Create a client spec as follow:
```clojure
(ns user
(:require [argoj.api :as argo]))(def client-spec
(argo/mk-client {:token "xxxx"
:endpoint "argo-server.argo.svc.cluster:2746"}))
```### Submit a Workflow
See [Field Reference](https://argoproj.github.io/argo-workflows/fields/) for all supported field used as EDN
#### Hello World
```clojure
(def spec
{:namespace "argo"
:serverDryRun false
:workflow {:metadata {:namespace "argo"
:generateName "foobar-"
:labels #:workflows.argoproj.io{:completed "false"}}
:spec
{:templates
[{:name "cowsay"
:container {:name "cowsay"
:image "docker/whalesay:latest"
:command ["cowsay"]
:args ["hello world"]
:resources {}}}]
:entrypoint "cowsay"}}})(argo/create-workflow client "argo" spec)
```### Search Workflow
Workflows can be selected by their labels:
```clojure
(argo/search-workflows spec "argo" {:initiator "foobar"}) ;; {:metadata {:resourceVersion ...
```### List Workflows
List workflows, and return their status / results
```clojure
(count (:items (argo/list-workflows client "argo"))) ;; => 1
```### Delete Workflows
Delete running or completed Workflow
```clojure
(argo/create-workflow client "argo" "foobar-8fu7j")
```### API
See complete implemented API method [on this documentation page.](https://iomonad.github.io/argoj/#argoj.api)
## Testing
```bash
lein test
```## Changelog
### 3.4.5-0.3.5
- Added unsafe executor function
- - Schema Fix### 3.4.5-0.2.0
- API & Spec Implemenations for Jobs, Events, Workflows, WorkflowsTemplate & CronJobs
- Admin routes implemenations### 3.4.5-0.1.0
- First API Release
## License
Copyright © 2023 iomonad
This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License, v. 2.0 are satisfied: GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or (at your
option) any later version, with the GNU Classpath Exception which is available
at https://www.gnu.org/software/classpath/license.html.