diff --git a/docs/parallelism.md b/docs/parallelism.md index 7b1b224b3ca0..24391c983ea3 100644 --- a/docs/parallelism.md +++ b/docs/parallelism.md @@ -22,9 +22,20 @@ Workflows that are executing but restricted from running more nodes due to the o ### Priority -Workflows can have a `priority` set in their specification. +You can set a priority on Workflows using the `priority` field in the specification -Workflows with a higher priority number that have not started due to controller level parallelism will be started before lower priority workflows. +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Workflow +metadata: + generateName: priority- +spec: + priority: 3 + ... +```` + +Workflows that have not started due to controller level parallelism will be queued: Workflows with higher priority numbers will start before lower priority ones. +The default workflow priority is `0`. ## Synchronization diff --git a/docs/synchronization.md b/docs/synchronization.md index 759eff474c8a..178d59ca8990 100644 --- a/docs/synchronization.md +++ b/docs/synchronization.md @@ -158,7 +158,7 @@ Examples: When a Workflow cannot acquire a lock it will be placed into a ordered queue. -Workflows can have a `priority` set in their specification. +You can set a [`priority`](parallelism.md#priority) on Workflows. The queue is first ordered by priority: a higher priority number is placed before a lower priority number. The queue is then ordered by `creationTimestamp`: older Workflows are placed before newer workflows.