Skip to content

Commit 7ea34ba

Browse files
committed
Update Instance ID documentation
1 parent 5291e0b commit 7ea34ba

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

docs/scaling.md

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,9 @@ Rather than running a single installation in your cluster, run one per namespace
108108

109109
### Instance ID
110110

111-
Within a cluster can use instance ID to run N Argo instances within a cluster.
111+
Within a cluster you can use instance ID to run many Argo instances within a cluster. You can run each instance in separate, or the same namespace.
112112

113-
Create one namespace for each Argo, e.g. `argo-i1`, `argo-i2`:.
114-
115-
Edit [`workflow-controller-configmap.yaml`](workflow-controller-configmap.yaml) for each namespace to set an instance ID.
113+
For each instance, edit the [`workflow-controller-configmap.yaml`](workflow-controller-configmap.yaml) to set an `instanceID`.
116114

117115
```yaml
118116
apiVersion: v1
@@ -123,13 +121,42 @@ data:
123121
instanceID: i1
124122
```
125123

126-
You may need to pass the instance ID to the CLI:
124+
#### CLI Usage
125+
126+
When you are using the CLI, set the `--instanceid` to interact with a specific instance. For example, to submit a Workflow defined in `my-wf.yaml`:
127127

128128
```bash
129129
argo --instanceid i1 submit my-wf.yaml
130130
```
131131

132-
You do not need to have one instance ID per namespace, you could have many or few.
132+
#### Declarative Usage
133+
134+
You can also declare which instance to use in the each of the Custom Resources. For example, on a `Workflow`:
135+
136+
```yaml
137+
apiVersion: argoproj.io/v1alpha1
138+
kind: Workflow
139+
metadata:
140+
labels:
141+
workflows.argoproj.io/controller-instanceid: i1
142+
```
143+
144+
It can also be useful, when defining a `WorkflowTemplate` to use `templateDefaults`
145+
146+
```yaml
147+
apiVersion: argoproj.io/v1alpha1
148+
kind: WorkflowTemplate
149+
metadata:
150+
labels:
151+
workflows.argoproj.io/controller-instanceid: i1
152+
name: example
153+
spec:
154+
templateDefaults:
155+
metadata:
156+
labels:
157+
workflows.argoproj.io/controller-instanceid: i1
158+
```
159+
133160

134161
### Maximum Recursion Depth
135162

docs/workflow-controller-configmap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Config contains the root of the configuration settings for the workflow controll
7676
| `KubeConfig` | [`KubeConfig`](#kubeconfig) | KubeConfig specifies a kube config file for the wait & init containers |
7777
| `ArtifactRepository` | [`wfv1.ArtifactRepository`](fields.md#artifactrepository) | ArtifactRepository contains the default location of an artifact repository for container artifacts |
7878
| `Namespace` | `string` | Namespace is a label selector filter to limit the controller's watch to a specific namespace |
79-
| `InstanceID` | `string` | InstanceID is a label selector to limit the controller's watch to a specific instance. It contains an arbitrary value that is carried forward into its pod labels, under the key workflows.argoproj.io/controller-instanceid, for the purposes of workflow segregation. This enables a controller to only receive workflow and pod events that it is interested about, in order to support multiple controllers in a single cluster, and ultimately allows the controller itself to be bundled as part of a higher level application. If omitted, the controller watches workflows and pods that *are not* labeled with an instance id. |
79+
| `InstanceID` | `string` | InstanceID is a label selector to limit the controller's watch to a specific instance. It contains an arbitrary value that is carried forward into its pod labels, under the key workflows.argoproj.io/controller-instanceid, for the purposes of workflow segregation. This enables a controller to only receive workflow and pod events that it is interested about, in order to support multiple controllers in a single cluster, and ultimately allows the controller itself to be bundled as part of a higher level application. If omitted, the controller watches workflows and pods that *are not* labeled with an instance id. See [Scaling - Instance ID](scaling.md#instance-id) for more details. |
8080
| `MetricsConfig` | [`MetricsConfig`](#metricsconfig) | MetricsConfig specifies configuration for metrics emission. Metrics are enabled and emitted on localhost:9090/metrics by default. |
8181
| `TelemetryConfig` | [`MetricsConfig`](#metricsconfig) | TelemetryConfig specifies configuration for telemetry emission. Telemetry is enabled and emitted in the same endpoint as metrics by default, but can be overridden using this config. |
8282
| `Parallelism` | `int` | Parallelism limits the max total parallel workflows that can execute at the same time |

0 commit comments

Comments
 (0)