Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
12 changes: 9 additions & 3 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ jobs:
# contention on the runner, which we have no control over.
timeout-minutes: 60
env:
KUBECONFIG: /home/runner/.kubeconfig
KUBECONFIG: /home/runner/.kube/config
E2E_ENV_FACTOR: 2
strategy:
fail-fast: false
Expand Down Expand Up @@ -267,6 +267,10 @@ jobs:
- test: test-plugins
profile: plugins
use-api: false
- test: test-go-sdk
profile: minimal
use-api: true
secure: true
- test: test-java-sdk
profile: minimal
use-api: true
Expand Down Expand Up @@ -334,7 +338,8 @@ jobs:
K3S_KUBECONFIG_MODE=644 \
sh -
until kubectl --kubeconfig=/etc/rancher/k3s/k3s.yaml cluster-info ; do sleep 10s ; done
cp /etc/rancher/k3s/k3s.yaml /home/runner/.kubeconfig
mkdir -p .kube
cp /etc/rancher/k3s/k3s.yaml /home/runner/.kube/config
echo "- name: fake_token_user" >> $KUBECONFIG
echo " user:" >> $KUBECONFIG
echo " token: xxxxxx" >> $KUBECONFIG
Expand Down Expand Up @@ -376,8 +381,9 @@ jobs:
LOG_LEVEL=info \
API=${{matrix.use-api}} \
UI=false \
SECURE=${{ matrix.secure || 'false' }} \
POD_STATUS_CAPTURE_FINALIZER=true 2>&1 | tee /tmp/argo.log &
make wait PROFILE=${{matrix.profile}} API=${{matrix.use-api}}
make wait PROFILE=${{matrix.profile}} API=${{matrix.use-api}} SECURE=${{ matrix.secure || 'false' }}
timeout-minutes: 5
- name: Validate release manifests
run: make manifests-validate
Expand Down
2 changes: 2 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ errored
expr
fibonacci
finalizer
gRPC
gitops
goroutine
goroutines
Expand All @@ -191,6 +192,7 @@ k8s-jobs
kube
kube-apiserver
kube-scheduler
kubeconfig
kubectl
kubelet
kubernetes
Expand Down
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ TOOL_SWAGGER := $(GOPATH)/bin/swagger
TOOL_GOIMPORTS := $(GOPATH)/bin/goimports
TOOL_GOLANGCI_LINT := $(GOPATH)/bin/golangci-lint
TOOL_GOTESTSUM := $(GOPATH)/bin/gotestsum
TOOL_SNIPDOC := $(HOME)/.local/bin/snipdoc

# npm bin -g will do this on later npms than we have
NVM_BIN ?= $(shell npm config get prefix)/bin
Expand Down Expand Up @@ -225,7 +226,7 @@ SWAGGER_FILES := pkg/apiclient/_.primary.swagger.json \
pkg/apiclient/workflowtemplate/workflow-template.swagger.json \
pkg/apiclient/sync/sync.swagger.json
PROTO_BINARIES := $(TOOL_PROTOC_GEN_GOGO) $(TOOL_PROTOC_GEN_GOGOFAST) $(TOOL_GOIMPORTS) $(TOOL_PROTOC_GEN_GRPC_GATEWAY) $(TOOL_PROTOC_GEN_SWAGGER) $(TOOL_CLANG_FORMAT)
GENERATED_DOCS := docs/fields.md docs/cli/argo.md docs/workflow-controller-configmap.md docs/metrics.md
GENERATED_DOCS := docs/fields.md docs/cli/argo.md docs/workflow-controller-configmap.md docs/metrics.md docs/go-sdk-guide.md

# protoc,my.proto
define protoc
Expand Down Expand Up @@ -448,6 +449,12 @@ ifneq ($(USE_NIX), true)
go install gotest.tools/[email protected]
endif

$(TOOL_SNIPDOC): Makefile
# update this in Nix when upgrading it here
ifneq ($(USE_NIX), true)
./hack/install-snipdoc.sh $(TOOL_SNIPDOC) v0.1.12
endif

$(TOOL_CLANG_FORMAT):
ifeq (, $(shell which clang-format))
ifeq ($(shell uname),Darwin)
Expand Down Expand Up @@ -820,6 +827,9 @@ docs/workflow-controller-configmap.md: config/*.go hack/docs/workflow-controller
docs/cli/argo.md: $(CLI_PKG_FILES) go.sum ui/dist/app/index.html hack/docs/cli.go
go run ./hack/docs cli

docs/go-sdk-guide.md: $(TOOL_SNIPDOC)
$(TOOL_SNIPDOC) run

$(TOOL_MDSPELL): Makefile
# update this in Nix when upgrading it here
ifneq ($(USE_NIX), true)
Expand Down Expand Up @@ -853,7 +863,7 @@ endif
.PHONY: docs-lint
docs-lint: $(TOOL_MARKDOWNLINT) docs/metrics.md
# lint docs
$(TOOL_MARKDOWNLINT) docs --fix --ignore docs/fields.md --ignore docs/executor_swagger.md --ignore docs/cli --ignore docs/walk-through/the-structure-of-workflow-specs.md --ignore docs/tested-kubernetes-versions.md
$(TOOL_MARKDOWNLINT) docs --fix --ignore docs/fields.md --ignore docs/executor_swagger.md --ignore docs/cli --ignore docs/walk-through/the-structure-of-workflow-specs.md --ignore docs/tested-kubernetes-versions.md --ignore docs/go-sdk-guide.md

$(TOOL_MKDOCS): docs/requirements.txt
# update this in Nix when upgrading it here
Expand Down Expand Up @@ -967,3 +977,7 @@ pkg/apiclient/artifact/artifact.swagger.json: $(PROTO_BINARIES) $(TYPES) pkg/api

# Add artifact-proto to swagger dependencies
swagger: pkg/apiclient/artifact/artifact.swagger.json

.PHONY: test-go-sdk
test-go-sdk: ## Run all Go SDK examples
./hack/test-go-sdk.sh
35 changes: 26 additions & 9 deletions docs/client-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,35 @@ yourself. You can use a client library for the programming language you are usin

Client libraries often handle common tasks such as authentication for you.

## Auto-generated client libraries
## Client Libraries

The following client libraries are auto-generated using [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator-cli).
Please expect very minimal support from the Argo team.
We have libraries for the following languages:

| Language | Client Library | Examples/Docs |
|----------|---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| Golang | [`apiclient.go`](https://github.com/argoproj/argo-workflows/blob/main/pkg/apiclient/apiclient.go) | [Example](https://github.com/argoproj/argo-workflows/blob/main/cmd/argo/commands/submit.go) |
| Java | [Java](https://github.com/argoproj/argo-workflows/blob/main/sdks/java) | |
| Python | [Hera](#hera-python-sdk) | [Hera walk-through](https://hera.readthedocs.io/en/stable/walk-through/quick-start/) |
* [Go](#go-sdk)
* [Java](#java-sdk)
* [Python](#hera-python-sdk)

## Hera Python SDK
Please feel free to contribute more language libraries to help improve the Argo Workflows ecosystem.

### Go SDK

The [Go SDK](./go-sdk-guide.md) is a fully-featured client for Argo Workflows. It provides two client approaches:

* **Kubernetes Client** - Direct CRD access for in-cluster applications
* **Argo Server Client** - gRPC/HTTP access for remote applications

**Documentation:**

* [Go SDK Guide](./go-sdk-guide.md) - Comprehensive documentation
* [Examples](https://github.com/argoproj/argo-workflows/blob/main/sdks/go/) - Working code examples
* [API Reference](https://pkg.go.dev/github.com/argoproj/argo-workflows/v3)

### Java SDK

The [Java](https://github.com/argoproj/argo-workflows/blob/main/sdks/java) library is auto-generated using OpenAPI Generator.
It is community supported.

### Hera Python SDK

Hera is the recommended Python SDK for Argo Workflows. It makes Argo Workflows simple and intuitive, going beyond a basic REST interface to allow you to easily turn Python functions into script templates and write whole Workflows in Python:

Expand Down
Loading
Loading