Skip to content

Commit

Permalink
feat(controller): Add failFast flag to DAG and Step templates (argopr…
Browse files Browse the repository at this point in the history
…oj#5315)

Signed-off-by: Simon Behar <[email protected]>
  • Loading branch information
simster7 authored Mar 12, 2021
1 parent fcb0989 commit 57c05df
Show file tree
Hide file tree
Showing 17 changed files with 857 additions and 505 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ GIT_TREE_STATE := $(shell if [ -z "`git status --porcelain`" ]; then echo
RELEASE_TAG := $(shell if [[ "$(GIT_TAG)" =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$$ ]]; then echo "true"; else echo "false"; fi)
DEV_BRANCH := $(shell [ $(GIT_BRANCH) = master ] || [ `echo $(GIT_BRANCH) | cut -c -8` = release- ] || [ $(RELEASE_TAG) = true ] && echo false || echo true)

GREP_LOGS := ""

# docker image publishing options
IMAGE_NAMESPACE ?= argoproj
DEV_IMAGE ?= $(shell [ `uname -s` = Darwin ] && echo true || echo false)
Expand Down Expand Up @@ -463,7 +465,7 @@ endif
./hack/port-forward.sh
ifeq ($(RUN_MODE),local)
killall goreman || true
env DEFAULT_REQUEUE_TIME=$(DEFAULT_REQUEUE_TIME) SECURE=$(SECURE) ALWAYS_OFFLOAD_NODE_STATUS=$(ALWAYS_OFFLOAD_NODE_STATUS) LOG_LEVEL=$(LOG_LEVEL) UPPERIO_DB_DEBUG=$(UPPERIO_DB_DEBUG) IMAGE_NAMESPACE=$(IMAGE_NAMESPACE) VERSION=$(VERSION) AUTH_MODE=$(AUTH_MODE) NAMESPACED=$(NAMESPACED) NAMESPACE=$(KUBE_NAMESPACE) $(GOPATH)/bin/goreman -set-ports=false -logtime=false start controller argo-server $(shell [ $(START_UI) = false ]&& echo ui || echo)
env DEFAULT_REQUEUE_TIME=$(DEFAULT_REQUEUE_TIME) SECURE=$(SECURE) ALWAYS_OFFLOAD_NODE_STATUS=$(ALWAYS_OFFLOAD_NODE_STATUS) LOG_LEVEL=$(LOG_LEVEL) UPPERIO_DB_DEBUG=$(UPPERIO_DB_DEBUG) IMAGE_NAMESPACE=$(IMAGE_NAMESPACE) VERSION=$(VERSION) AUTH_MODE=$(AUTH_MODE) NAMESPACED=$(NAMESPACED) NAMESPACE=$(KUBE_NAMESPACE) $(GOPATH)/bin/goreman -set-ports=false -logtime=false start controller argo-server $(shell [ $(START_UI) = false ]&& echo ui || echo) $(shell if [ -z $GREP_LOGS ]; then echo; else echo "| grep \"$(GREP_LOGS)\""; fi)
endif

$(GOPATH)/bin/stern:
Expand Down
4 changes: 4 additions & 0 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4866,6 +4866,10 @@
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ExecutorConfig",
"description": "Executor holds configurations of the executor container."
},
"failFast": {
"description": "FailFast, if specified, will fail this template if any of its child pods has failed. This is useful for when this template is expanded with `withItems`, etc.",
"type": "boolean"
},
"hostAliases": {
"description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod spec",
"items": {
Expand Down
4 changes: 4 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -8284,6 +8284,10 @@
"description": "Executor holds configurations of the executor container.",
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.ExecutorConfig"
},
"failFast": {
"description": "FailFast, if specified, will fail this template if any of its child pods has failed. This is useful for when this template is expanded with `withItems`, etc.",
"type": "boolean"
},
"hostAliases": {
"description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod spec",
"type": "array",
Expand Down
1 change: 1 addition & 0 deletions docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -2118,6 +2118,7 @@ Template is a reusable and composable unit of execution in a workflow
|`dag`|[`DAGTemplate`](#dagtemplate)|DAG template subtype which runs a DAG|
|`data`|[`Data`](#data)|Data is a data template|
|`executor`|[`ExecutorConfig`](#executorconfig)|Executor holds configurations of the executor container.|
|`failFast`|`boolean`|FailFast, if specified, will fail this template if any of its child pods has failed. This is useful for when this template is expanded with `withItems`, etc.|
|`hostAliases`|`Array<`[`HostAlias`](#hostalias)`>`|HostAliases is an optional list of hosts and IPs that will be injected into the pod spec|
|`initContainers`|`Array<`[`UserContainer`](#usercontainer)`>`|InitContainers is a list of containers which run before the main container.|
|`inputs`|[`Inputs`](#inputs)|Inputs describe what inputs parameters and artifacts are supplied to this template|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3355,6 +3355,8 @@ spec:
serviceAccountName:
type: string
type: object
failFast:
type: boolean
hostAliases:
items:
properties:
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/full/argoproj.io_cronworkflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3376,6 +3376,8 @@ spec:
serviceAccountName:
type: string
type: object
failFast:
type: boolean
hostAliases:
items:
properties:
Expand Down
6 changes: 6 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3364,6 +3364,8 @@ spec:
serviceAccountName:
type: string
type: object
failFast:
type: boolean
hostAliases:
items:
properties:
Expand Down Expand Up @@ -11711,6 +11713,8 @@ spec:
serviceAccountName:
type: string
type: object
failFast:
type: boolean
hostAliases:
items:
properties:
Expand Down Expand Up @@ -18334,6 +18338,8 @@ spec:
serviceAccountName:
type: string
type: object
failFast:
type: boolean
hostAliases:
items:
properties:
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3354,6 +3354,8 @@ spec:
serviceAccountName:
type: string
type: object
failFast:
type: boolean
hostAliases:
items:
properties:
Expand Down
Loading

0 comments on commit 57c05df

Please sign in to comment.