Skip to content

Commit 9c1a63c

Browse files
feat: advanced sync (pull request #76)
Signed-off-by: Denis <[email protected]>
1 parent bcfcece commit 9c1a63c

32 files changed

+2457
-708
lines changed

api/jsonschema/schema.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5378,6 +5378,13 @@
53785378
"name": {
53795379
"description": "name of the mutex",
53805380
"type": "string"
5381+
},
5382+
"selectors": {
5383+
"description": "Selectors is a list of references to dynamic values (like parameters, labels, annotations) that can be added to mutex key to make concurrency more customizable",
5384+
"items": {
5385+
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.SyncSelector"
5386+
},
5387+
"type": "array"
53815388
}
53825389
},
53835390
"type": "object"
@@ -6268,6 +6275,13 @@
62686275
"configMapKeyRef": {
62696276
"$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapKeySelector",
62706277
"description": "ConfigMapKeyRef is configmap selector for Semaphore configuration"
6278+
},
6279+
"selectors": {
6280+
"description": "Selectors is a list of references to dynamic values (like parameters, labels, annotations) that can be added to semaphore key to make concurrency more customizable",
6281+
"items": {
6282+
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.SyncSelector"
6283+
},
6284+
"type": "array"
62716285
}
62726286
},
62736287
"type": "object"
@@ -6404,6 +6418,20 @@
64046418
},
64056419
"type": "object"
64066420
},
6421+
"io.argoproj.workflow.v1alpha1.SyncSelector": {
6422+
"description": "Synchronization selector",
6423+
"properties": {
6424+
"name": {
6425+
"description": "Name of the selector",
6426+
"type": "string"
6427+
},
6428+
"template": {
6429+
"description": "Template replaced with global variables",
6430+
"type": "string"
6431+
}
6432+
},
6433+
"type": "object"
6434+
},
64076435
"io.argoproj.workflow.v1alpha1.Synchronization": {
64086436
"description": "Synchronization holds synchronization lock configuration",
64096437
"properties": {

api/openapi-spec/swagger.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9282,6 +9282,13 @@
92829282
"name": {
92839283
"description": "name of the mutex",
92849284
"type": "string"
9285+
},
9286+
"selectors": {
9287+
"description": "Selectors is a list of references to dynamic values (like parameters, labels, annotations) that can be added to mutex key to make concurrency more customizable",
9288+
"type": "array",
9289+
"items": {
9290+
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.SyncSelector"
9291+
}
92859292
}
92869293
}
92879294
},
@@ -10172,6 +10179,13 @@
1017210179
"configMapKeyRef": {
1017310180
"description": "ConfigMapKeyRef is configmap selector for Semaphore configuration",
1017410181
"$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapKeySelector"
10182+
},
10183+
"selectors": {
10184+
"description": "Selectors is a list of references to dynamic values (like parameters, labels, annotations) that can be added to semaphore key to make concurrency more customizable",
10185+
"type": "array",
10186+
"items": {
10187+
"$ref": "#/definitions/io.argoproj.workflow.v1alpha1.SyncSelector"
10188+
}
1017510189
}
1017610190
}
1017710191
},
@@ -10307,6 +10321,20 @@
1030710321
}
1030810322
}
1030910323
},
10324+
"io.argoproj.workflow.v1alpha1.SyncSelector": {
10325+
"description": "Synchronization selector",
10326+
"type": "object",
10327+
"properties": {
10328+
"name": {
10329+
"description": "Name of the selector",
10330+
"type": "string"
10331+
},
10332+
"template": {
10333+
"description": "Template replaced with global variables",
10334+
"type": "string"
10335+
}
10336+
}
10337+
},
1031010338
"io.argoproj.workflow.v1alpha1.Synchronization": {
1031110339
"description": "Synchronization holds synchronization lock configuration",
1031210340
"type": "object",

docs/executor_swagger.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,6 +2455,7 @@ than the MaxAge, it will be ignored. | |
24552455
| Name | Type | Go type | Required | Default | Description | Example |
24562456
|------|------|---------|:--------:| ------- |-------------|---------|
24572457
| name | string| `string` | | | name of the mutex | |
2458+
| selectors | [][SyncSelector](#sync-selector)| `[]*SyncSelector` | | | Selectors is a list of references to dynamic values (like parameters, labels, annotations) that can be added to mutex key to make concurrency more customizable | |
24582459

24592460

24602461

@@ -4216,6 +4217,7 @@ Note that this field cannot be set when spec.os.name is windows.
42164217
| Name | Type | Go type | Required | Default | Description | Example |
42174218
|------|------|---------|:--------:| ------- |-------------|---------|
42184219
| configMapKeyRef | [ConfigMapKeySelector](#config-map-key-selector)| `ConfigMapKeySelector` | | | | |
4220+
| selectors | [][SyncSelector](#sync-selector)| `[]*SyncSelector` | | | Selectors is a list of references to dynamic values (like parameters, labels, annotations) that can be added to semaphore key to make concurrency more customizable | |
42194221

42204222

42214223

@@ -4341,6 +4343,25 @@ Namespaces that do not pre-exist within StorageOS will be created.
43414343

43424344

43434345

4346+
### <span id="sync-selector"></span> SyncSelector
4347+
4348+
4349+
> Synchronization selector
4350+
4351+
4352+
4353+
4354+
4355+
4356+
**Properties**
4357+
4358+
| Name | Type | Go type | Required | Default | Description | Example |
4359+
|------|------|---------|:--------:| ------- |-------------|---------|
4360+
| name | string| `string` | | | Name of the selector | |
4361+
| template | string| `string` | | | Template replaced with global variables | |
4362+
4363+
4364+
43444365
### <span id="synchronization"></span> Synchronization
43454366

43464367

docs/fields.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,7 @@ Mutex holds Mutex configuration
23372337
| Field Name | Field Type | Description |
23382338
|:----------:|:----------:|---------------|
23392339
|`name`|`string`|name of the mutex|
2340+
|`selectors`|`Array<`[`SyncSelector`](#syncselector)`>`|Selectors is a list of references to dynamic values (like parameters, labels, annotations) that can be added to mutex key to make concurrency more customizable|
23402341

23412342
## SemaphoreRef
23422343

@@ -2346,6 +2347,7 @@ SemaphoreRef is a reference of Semaphore
23462347
| Field Name | Field Type | Description |
23472348
|:----------:|:----------:|---------------|
23482349
|`configMapKeyRef`|[`ConfigMapKeySelector`](#configmapkeyselector)|ConfigMapKeyRef is configmap selector for Semaphore configuration|
2350+
|`selectors`|`Array<`[`SyncSelector`](#syncselector)`>`|Selectors is a list of references to dynamic values (like parameters, labels, annotations) that can be added to semaphore key to make concurrency more customizable|
23492351

23502352
## ArtifactLocation
23512353

@@ -3665,6 +3667,23 @@ MetricLabel is a single label for a prometheus metric
36653667

36663668
RetryNodeAntiAffinity is a placeholder for future expansion, only empty nodeAntiAffinity is allowed. In order to prevent running steps on the same host, it uses "kubernetes.io/hostname".
36673669

3670+
## SyncSelector
3671+
3672+
Synchronization selector
3673+
3674+
<details>
3675+
<summary>Examples with this field (click to open)</summary>
3676+
<br>
3677+
3678+
- [`input-artifact-git.yaml`](https://github.com/argoproj/argo-workflows/blob/master/examples/input-artifact-git.yaml)
3679+
</details>
3680+
3681+
### Fields
3682+
| Field Name | Field Type | Description |
3683+
|:----------:|:----------:|---------------|
3684+
|`name`|`string`|Name of the selector|
3685+
|`template`|`string`|Template replaced with global variables|
3686+
36683687
## ContainerNode
36693688

36703689
_No description available_

manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,6 +1838,15 @@ spec:
18381838
properties:
18391839
name:
18401840
type: string
1841+
selectors:
1842+
items:
1843+
properties:
1844+
name:
1845+
type: string
1846+
template:
1847+
type: string
1848+
type: object
1849+
type: array
18411850
type: object
18421851
semaphore:
18431852
properties:
@@ -1852,6 +1861,15 @@ spec:
18521861
required:
18531862
- key
18541863
type: object
1864+
selectors:
1865+
items:
1866+
properties:
1867+
name:
1868+
type: string
1869+
template:
1870+
type: string
1871+
type: object
1872+
type: array
18551873
type: object
18561874
type: object
18571875
templateDefaults:
@@ -9227,6 +9245,15 @@ spec:
92279245
properties:
92289246
name:
92299247
type: string
9248+
selectors:
9249+
items:
9250+
properties:
9251+
name:
9252+
type: string
9253+
template:
9254+
type: string
9255+
type: object
9256+
type: array
92309257
type: object
92319258
semaphore:
92329259
properties:
@@ -9241,6 +9268,15 @@ spec:
92419268
required:
92429269
- key
92439270
type: object
9271+
selectors:
9272+
items:
9273+
properties:
9274+
name:
9275+
type: string
9276+
template:
9277+
type: string
9278+
type: object
9279+
type: array
92449280
type: object
92459281
type: object
92469282
timeout:
@@ -17316,6 +17352,15 @@ spec:
1731617352
properties:
1731717353
name:
1731817354
type: string
17355+
selectors:
17356+
items:
17357+
properties:
17358+
name:
17359+
type: string
17360+
template:
17361+
type: string
17362+
type: object
17363+
type: array
1731917364
type: object
1732017365
semaphore:
1732117366
properties:
@@ -17330,6 +17375,15 @@ spec:
1733017375
required:
1733117376
- key
1733217377
type: object
17378+
selectors:
17379+
items:
17380+
properties:
17381+
name:
17382+
type: string
17383+
template:
17384+
type: string
17385+
type: object
17386+
type: array
1733317387
type: object
1733417388
type: object
1733517389
timeout:

manifests/base/crds/full/argoproj.io_cronworkflows.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,6 +1859,15 @@ spec:
18591859
properties:
18601860
name:
18611861
type: string
1862+
selectors:
1863+
items:
1864+
properties:
1865+
name:
1866+
type: string
1867+
template:
1868+
type: string
1869+
type: object
1870+
type: array
18621871
type: object
18631872
semaphore:
18641873
properties:
@@ -1873,6 +1882,15 @@ spec:
18731882
required:
18741883
- key
18751884
type: object
1885+
selectors:
1886+
items:
1887+
properties:
1888+
name:
1889+
type: string
1890+
template:
1891+
type: string
1892+
type: object
1893+
type: array
18761894
type: object
18771895
type: object
18781896
templateDefaults:
@@ -9248,6 +9266,15 @@ spec:
92489266
properties:
92499267
name:
92509268
type: string
9269+
selectors:
9270+
items:
9271+
properties:
9272+
name:
9273+
type: string
9274+
template:
9275+
type: string
9276+
type: object
9277+
type: array
92519278
type: object
92529279
semaphore:
92539280
properties:
@@ -9262,6 +9289,15 @@ spec:
92629289
required:
92639290
- key
92649291
type: object
9292+
selectors:
9293+
items:
9294+
properties:
9295+
name:
9296+
type: string
9297+
template:
9298+
type: string
9299+
type: object
9300+
type: array
92659301
type: object
92669302
type: object
92679303
timeout:
@@ -17337,6 +17373,15 @@ spec:
1733717373
properties:
1733817374
name:
1733917375
type: string
17376+
selectors:
17377+
items:
17378+
properties:
17379+
name:
17380+
type: string
17381+
template:
17382+
type: string
17383+
type: object
17384+
type: array
1734017385
type: object
1734117386
semaphore:
1734217387
properties:
@@ -17351,6 +17396,15 @@ spec:
1735117396
required:
1735217397
- key
1735317398
type: object
17399+
selectors:
17400+
items:
17401+
properties:
17402+
name:
17403+
type: string
17404+
template:
17405+
type: string
17406+
type: object
17407+
type: array
1735417408
type: object
1735517409
type: object
1735617410
timeout:

0 commit comments

Comments
 (0)