Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow cross-namespace locking for semaphore and mutex #11096

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5416,6 +5416,10 @@
"name": {
"description": "name of the mutex",
"type": "string"
},
"namespace": {
"description": "Namespace is the namespace of the mutex, default: [namespace of workflow]",
"type": "string"
}
},
"type": "object"
Expand Down Expand Up @@ -6306,6 +6310,10 @@
"configMapKeyRef": {
"$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapKeySelector",
"description": "ConfigMapKeyRef is configmap selector for Semaphore configuration"
},
"namespace": {
"description": "Namespace is the namespace of the configmap, default: [namespace of workflow]",
"type": "string"
}
},
"type": "object"
Expand Down
8 changes: 8 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -9352,6 +9352,10 @@
"name": {
"description": "name of the mutex",
"type": "string"
},
"namespace": {
"description": "Namespace is the namespace of the mutex, default: [namespace of workflow]",
"type": "string"
}
}
},
Expand Down Expand Up @@ -10242,6 +10246,10 @@
"configMapKeyRef": {
"description": "ConfigMapKeyRef is configmap selector for Semaphore configuration",
"$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapKeySelector"
},
"namespace": {
"description": "Namespace is the namespace of the configmap, default: [namespace of workflow]",
"type": "string"
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions docs/executor_swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -2468,6 +2468,7 @@ than the MaxAge, it will be ignored. | |
| Name | Type | Go type | Required | Default | Description | Example |
|------|------|---------|:--------:| ------- |-------------|---------|
| name | string| `string` | | | name of the mutex | |
| namespace | string| `string` | | `"[namespace of workflow]"`| | |



Expand Down Expand Up @@ -4229,6 +4230,7 @@ Note that this field cannot be set when spec.os.name is windows.
| Name | Type | Go type | Required | Default | Description | Example |
|------|------|---------|:--------:| ------- |-------------|---------|
| configMapKeyRef | [ConfigMapKeySelector](#config-map-key-selector)| `ConfigMapKeySelector` | | | | |
| namespace | string| `string` | | `"[namespace of workflow]"`| | |



Expand Down
2 changes: 2 additions & 0 deletions docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,7 @@ Mutex holds Mutex configuration
| Field Name | Field Type | Description |
|:----------:|:----------:|---------------|
|`name`|`string`|name of the mutex|
|`namespace`|`string`|Namespace is the namespace of the mutex, default: [namespace of workflow]|

## SemaphoreRef

Expand All @@ -2347,6 +2348,7 @@ SemaphoreRef is a reference of Semaphore
| Field Name | Field Type | Description |
|:----------:|:----------:|---------------|
|`configMapKeyRef`|[`ConfigMapKeySelector`](#configmapkeyselector)|ConfigMapKeyRef is configmap selector for Semaphore configuration|
|`namespace`|`string`|Namespace is the namespace of the configmap, default: [namespace of workflow]|

## ArtifactLocation

Expand Down
12 changes: 12 additions & 0 deletions manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1842,6 +1842,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -1856,6 +1858,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
templateDefaults:
Expand Down Expand Up @@ -9233,6 +9237,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -9247,6 +9253,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down Expand Up @@ -17324,6 +17332,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -17338,6 +17348,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down
12 changes: 12 additions & 0 deletions manifests/base/crds/full/argoproj.io_cronworkflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -1877,6 +1879,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
templateDefaults:
Expand Down Expand Up @@ -9254,6 +9258,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -9268,6 +9274,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down Expand Up @@ -17345,6 +17353,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -17359,6 +17369,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down
28 changes: 28 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1856,6 +1856,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -1870,6 +1872,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
templateDefaults:
Expand Down Expand Up @@ -9247,6 +9251,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -9261,6 +9267,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down Expand Up @@ -17338,6 +17346,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -17352,6 +17362,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down Expand Up @@ -29016,6 +29028,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -29030,6 +29044,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down Expand Up @@ -31549,6 +31565,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -31563,6 +31581,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
templateDefaults:
Expand Down Expand Up @@ -38940,6 +38960,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -38954,6 +38976,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down Expand Up @@ -47031,6 +47055,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -47045,6 +47071,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down
4 changes: 4 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflowtasksets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7402,6 +7402,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -7416,6 +7418,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down
12 changes: 12 additions & 0 deletions manifests/base/crds/full/argoproj.io_workflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1841,6 +1841,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -1855,6 +1857,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
templateDefaults:
Expand Down Expand Up @@ -9232,6 +9236,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -9246,6 +9252,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down Expand Up @@ -17323,6 +17331,8 @@ spec:
properties:
name:
type: string
namespace:
type: string
type: object
semaphore:
properties:
Expand All @@ -17337,6 +17347,8 @@ spec:
required:
- key
type: object
namespace:
type: string
type: object
type: object
timeout:
Expand Down
Loading