Skip to content

Commit 4dc927c

Browse files
committed
Revert unstable multiple namespace support.
1 parent 96f5f27 commit 4dc927c

8 files changed

Lines changed: 156 additions & 559 deletions

File tree

README.md

Lines changed: 13 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -22,53 +22,16 @@ The table below lists the environment variables available and the relevant Tempo
2222

2323
| Environment Variable | Relevant Client or Worker option | Description |
2424
| --- | --- | --- |
25-
| TEMPORAL_GRPC_ENDPOINT | [ClientOptions.HostPort](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ClientOptions) | The Temporal Frontend GRPC endpoint (supports comma-separated values for multiple namespaces) |
26-
| TEMPORAL_TLS_KEY | [ClientOptions.ConnectionOptions.TLS](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS Key file (supports comma-separated values for multiple namespaces) |
27-
| TEMPORAL_TLS_CERT | [ClientOptions.ConnectionOptions.TLS](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS Cert file (supports comma-separated values for multiple namespaces) |
28-
| TEMPORAL_TLS_CA | [ClientOptions.ConnectionOptions.TLS](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS CA Cert file (supports comma-separated values for multiple namespaces) |
29-
| TEMPORAL_NAMESPACE | [ClientOptions.Namespace](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ClientOptions) | The Temporal Namespace (supports comma-separated values for multiple namespaces) |
25+
| TEMPORAL_GRPC_ENDPOINT | [ClientOptions.HostPort](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ClientOptions) | The Temporal Frontend GRPC endpoint |
26+
| TEMPORAL_TLS_KEY | [ClientOptions.ConnectionOptions.TLS](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS Key file |
27+
| TEMPORAL_TLS_CERT | [ClientOptions.ConnectionOptions.TLS](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS Cert file |
28+
| TEMPORAL_TLS_CA | [ClientOptions.ConnectionOptions.TLS](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS CA Cert file |
29+
| TEMPORAL_NAMESPACE | [ClientOptions.Namespace](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ClientOptions) | The Temporal Namespace |
3030
| TEMPORAL_TASK_QUEUE | [TaskQueue](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/worker#New) | The Temporal Task Queue |
3131
| TEMPORAL_WORKFLOW_TASK_POLLERS | [WorkerOptions.MaxConcurrentWorkflowTaskPollers](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#WorkerOptions) | Number of workflow task pollers |
3232
| TEMPORAL_ACTIVITY_TASK_POLLERS | [WorkerOptions.MaxConcurrentActivityTaskPollers](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#WorkerOptions) | Number of activity task pollers |
3333
| PROMETHEUS_ENDPOINT | n/a | The address to serve prometheus metrics on |
3434

35-
#### Multi-Namespace Support
36-
37-
The worker supports working with multiple namespaces simultaneously. This allows you to spread load across multiple namespaces with a single worker deployment, providing a more realistic load pattern.
38-
39-
**Configuration Options:**
40-
41-
1. **Same configuration for all namespaces:**
42-
```bash
43-
export TEMPORAL_NAMESPACE="ns1,ns2,ns3"
44-
export TEMPORAL_GRPC_ENDPOINT="temporal.example.com:7233"
45-
export TEMPORAL_TLS_CERT="/path/to/cert.pem"
46-
export TEMPORAL_TLS_KEY="/path/to/key.pem"
47-
```
48-
49-
2. **Different configurations per namespace:**
50-
```bash
51-
export TEMPORAL_NAMESPACE="ns1,ns2,ns3"
52-
export TEMPORAL_GRPC_ENDPOINT="temporal1.example.com:7233,temporal2.example.com:7233,temporal3.example.com:7233"
53-
export TEMPORAL_TLS_CERT="/certs/ns1.pem,/certs/ns2.pem,/certs/ns3.pem"
54-
export TEMPORAL_TLS_KEY="/keys/ns1.key,/keys/ns2.key,/keys/ns3.key"
55-
```
56-
57-
3. **Mixed configuration (some shared, some different):**
58-
```bash
59-
export TEMPORAL_NAMESPACE="ns1,ns2,ns3"
60-
export TEMPORAL_GRPC_ENDPOINT="temporal.example.com:7233" # Same endpoint for all
61-
export TEMPORAL_TLS_CERT="/certs/ns1.pem,/certs/ns2.pem" # ns3 will reuse ns2's cert
62-
export TEMPORAL_TLS_KEY="/keys/shared.key" # Same key for all
63-
```
64-
65-
**How it works:**
66-
- If you provide exactly as many values as namespaces, each namespace uses its corresponding value
67-
- If you provide only one value but multiple namespaces, that single value is reused for all namespaces
68-
- If you provide fewer values than namespaces, the last value is repeated for the remaining namespaces
69-
70-
The worker will create a separate worker instance for each namespace, all running concurrently within the same process.
71-
7235
#### Kubernetes Deployment
7336

7437
There are several ways to deploy the worker in Kubernetes:
@@ -85,19 +48,7 @@ kubectl run benchmark-worker --image ghcr.io/temporalio/benchmark-workers:main \
8548
--env "TEMPORAL_ACTIVITY_TASK_POLLERS=8"
8649
```
8750

88-
2. **Multi-namespace deployment example**:
89-
90-
```
91-
kubectl run benchmark-worker --image ghcr.io/temporalio/benchmark-workers:main \
92-
--image-pull-policy Always \
93-
--env "TEMPORAL_GRPC_ENDPOINT=temporal-frontend.temporal:7233" \
94-
--env "TEMPORAL_NAMESPACE=namespace1,namespace2,namespace3" \
95-
--env "TEMPORAL_TASK_QUEUE=benchmark" \
96-
--env "TEMPORAL_WORKFLOW_TASK_POLLERS=16" \
97-
--env "TEMPORAL_ACTIVITY_TASK_POLLERS=8"
98-
```
99-
100-
3. **Using the example deployment YAML**:
51+
2. **Using the example deployment YAML**:
10152

10253
We provide an [example deployment spec](./deployment.yaml) for you to customize to your requirements. Once you have edited the environment variables in the deployment.yaml you can create the deployment with `kubectl apply -f ./deployment.yaml`.
10354

@@ -145,20 +96,18 @@ This will run the ExecuteActivity workflow, described below.
14596

14697
### Runner
14798

148-
The runner is available as docker image for use in Docker or Kubernetes setups.
149-
150-
You can pull the latest image from: `ghcr.io/temporalio/benchmark-workers:main`.
99+
The runner is a tool that starts a set number of workflows concurrently and as each workflow completes it will start another. This is useful for providing consistent load to your Temporal cluster. The runner will start and maintain exactly the number of workflows concurrently that you specified.
151100

152101
The runner can be configured via environment variables and command line arguments. Currently only a small number of options are available, please let us know if there is a particular option you would like to be exposed by filing an issue.
153102

154103
The table below lists the environment variables available and the relevant Temporal Go SDK options they relate to (the runner is currently written using the Temporal Go SDK).
155104

156105
| Environment Variable | Relevant Client or Worker option | Description |
157106
| --- | --- | --- |
158-
| TEMPORAL_GRPC_ENDPOINT | [ClientOptions.HostPort](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ClientOptions) | The Temporal Frontend GRPC endpoint (supports comma-separated values for multiple namespaces) |
159-
| TEMPORAL_TLS_KEY | [ClientOptions.ConnectionOptions.TLS.Certificates](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS Key file (supports comma-separated values for multiple namespaces) |
160-
| TEMPORAL_TLS_CERT | [ClientOptions.ConnectionOptions.TLS.Certificates](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS Cert file (supports comma-separated values for multiple namespaces) |
161-
| TEMPORAL_TLS_CA | [ClientOptions.ConnectionOptions.TLS](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS CA Cert file (supports comma-separated values for multiple namespaces) |
107+
| TEMPORAL_GRPC_ENDPOINT | [ClientOptions.HostPort](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ClientOptions) | The Temporal Frontend GRPC endpoint |
108+
| TEMPORAL_TLS_KEY | [ClientOptions.ConnectionOptions.TLS.Certificates](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS Key file |
109+
| TEMPORAL_TLS_CERT | [ClientOptions.ConnectionOptions.TLS.Certificates](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS Cert file |
110+
| TEMPORAL_TLS_CA | [ClientOptions.ConnectionOptions.TLS](https://pkg.go.dev/go.temporal.io/sdk@v1.15.0/internal#ConnectionOptions) | Path to TLS CA Cert file |
162111
| PROMETHEUS_ENDPOINT | n/a | The address to serve prometheus metrics on |
163112

164113
The runner is also configured via command line options:
@@ -168,7 +117,7 @@ Usage: runner [flags] [workflow input] ...
168117
-c int
169118
concurrent workflows (default 10)
170119
-n string
171-
namespace (comma-separated list supported) (default "default")
120+
namespace (default "default")
172121
-s string
173122
signal type
174123
-t string
@@ -178,42 +127,13 @@ Usage: runner [flags] [workflow input] ...
178127
-w wait for workflows to complete (default true)
179128
```
180129

181-
#### Multi-Namespace Support in Runner
182-
183-
The runner supports distributing workflow executions across multiple namespaces. This provides a more realistic load pattern by spreading the load across different namespaces.
184-
185-
**Configuration Examples:**
186-
187-
1. **Command line flag for multiple namespaces:**
188-
```bash
189-
runner -n "namespace1,namespace2,namespace3" -t ExecuteActivity '{"Count":1,"Activity":"Sleep","Input":{"SleepTimeInSeconds":3}}'
190-
```
191-
192-
2. **Environment variable for multiple namespaces:**
193-
```bash
194-
export TEMPORAL_NAMESPACE="namespace1,namespace2,namespace3"
195-
runner -t ExecuteActivity '{"Count":1,"Activity":"Sleep","Input":{"SleepTimeInSeconds":3}}'
196-
```
197-
198-
3. **Different GRPC endpoints per namespace:**
199-
```bash
200-
export TEMPORAL_NAMESPACE="ns1,ns2,ns3"
201-
export TEMPORAL_GRPC_ENDPOINT="temporal1.example.com:7233,temporal2.example.com:7233,temporal3.example.com:7233"
202-
runner -t ExecuteActivity '{"Count":1,"Activity":"Sleep","Input":{"SleepTimeInSeconds":3}}'
203-
```
204-
205-
**How it works:**
206-
- The runner creates a separate client for each namespace
207-
- Workflow executions are distributed across namespaces using round-robin rotation
208-
- Each client can have different connection settings (endpoints, TLS certificates, etc.)
209-
210130
To use the runner in a Kubernetes cluster you could use:
211131

212132
```
213133
kubectl run benchmark-runner --image ghcr.io/temporalio/benchmark-workers:main \
214134
--image-pull-policy Always \
215135
--env "TEMPORAL_GRPC_ENDPOINT=temporal-frontend.temporal:7233" \
216-
--env "TEMPORAL_NAMESPACE=namespace1,namespace2,namespace3" \
136+
--env "TEMPORAL_NAMESPACE=default" \
217137
--command -- runner -t ExecuteActivity '{ "Count": 3, "Activity": "Echo", "Input": { "Message": "test" } }'
218138
```
219139

charts/benchmark-workers/README.md

Lines changed: 4 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -47,46 +47,6 @@ cd benchmark-workers
4747
helm install benchmark-workers ./charts/benchmark-workers
4848
```
4949

50-
## Multi-Namespace Support
51-
52-
The chart supports deploying workers and runners that work with multiple Temporal namespaces simultaneously. This provides a more realistic load pattern by distributing work across multiple namespaces with a single deployment.
53-
54-
### Configuration Examples
55-
56-
#### Single Namespace (Traditional)
57-
```yaml
58-
temporal:
59-
grpcEndpoint: "temporal-frontend.temporal:7233"
60-
namespace: "default"
61-
```
62-
63-
#### Multiple Namespaces with Same Configuration
64-
```yaml
65-
temporal:
66-
grpcEndpoint: "temporal-frontend.temporal:7233" # Same endpoint for all
67-
namespace: ["namespace1", "namespace2", "namespace3"]
68-
```
69-
70-
#### Multiple Namespaces with Different Endpoints
71-
```yaml
72-
temporal:
73-
grpcEndpoint: ["temporal1.temporal:7233", "temporal2.temporal:7233", "temporal3.temporal:7233"]
74-
namespace: ["namespace1", "namespace2", "namespace3"]
75-
```
76-
77-
#### Multiple Namespaces with Mixed TLS Configuration
78-
```yaml
79-
temporal:
80-
grpcEndpoint: ["temporal1.temporal:7233", "temporal2.temporal:7233"]
81-
namespace: ["namespace1", "namespace2", "namespace3"]
82-
tls:
83-
enabled: true
84-
# Use arrays for different TLS configs per namespace
85-
keys: ["key1-content", "key2-content"] # namespace3 will reuse key2-content
86-
certs: ["cert1-content", "cert2-content"] # namespace3 will reuse cert2-content
87-
ca: "shared-ca-content" # Same CA for all namespaces
88-
```
89-
9050
## Configuration
9151

9252
The following table lists the configurable parameters for the benchmark-workers chart and their default values.
@@ -96,20 +56,16 @@ The following table lists the configurable parameters for the benchmark-workers
9656
| `image.repository` | Image repository | `ghcr.io/temporalio/benchmark-workers` |
9757
| `image.tag` | Image tag | `latest` |
9858
| `image.pullPolicy` | Image pull policy | `Always` |
99-
| `temporal.grpcEndpoint` | Temporal frontend endpoint(s) (string or array) | `temporal-frontend.temporal:7233` |
100-
| `temporal.namespace` | Temporal namespace(s) (string or array) | `default` |
59+
| `temporal.grpcEndpoint` | Temporal frontend endpoint | `temporal-frontend.temporal:7233` |
60+
| `temporal.namespace` | Temporal namespace | `default` |
10161
| `temporal.taskQueue` | Task queue name | `benchmark` |
10262
| `temporal.workflowTaskPollers` | Number of workflow task pollers | `16` |
10363
| `temporal.activityTaskPollers` | Number of activity task pollers | `8` |
10464
| `temporal.tls.enabled` | Enable TLS | `false` |
10565
| `temporal.tls.key` | TLS key content (base64 encoded) | `""` |
10666
| `temporal.tls.cert` | TLS certificate content (base64 encoded) | `""` |
10767
| `temporal.tls.ca` | TLS CA certificate content (base64 encoded) | `""` |
108-
| `temporal.tls.keys` | Array of TLS key contents for multi-namespace | `[]` |
109-
| `temporal.tls.certs` | Array of TLS certificate contents for multi-namespace | `[]` |
110-
| `temporal.tls.cas` | Array of TLS CA certificate contents for multi-namespace | `[]` |
11168
| `temporal.tls.existingSecret` | Use existing Kubernetes secret for TLS | `""` |
112-
| `temporal.tls.existingSecrets` | Array of existing Kubernetes secrets for multi-namespace | `[]` |
11369
| `temporal.tls.disableHostVerification` | Disable TLS host verification | `false` |
11470
| `metrics.enabled` | Enable Prometheus metrics | `true` |
11571
| `metrics.port` | Port to expose metrics on | `9090` |
@@ -134,9 +90,7 @@ The following table lists the configurable parameters for the benchmark-workers
13490

13591
## TLS Configuration
13692

137-
### Single Namespace TLS
138-
139-
To use TLS with a single namespace, set `temporal.tls.enabled` to `true` and either:
93+
To use TLS, set `temporal.tls.enabled` to `true` and either:
14094

14195
1. Provide the TLS materials in the values file (not recommended for production):
14296

@@ -167,46 +121,6 @@ temporal:
167121
existingSecret: "temporal-tls"
168122
```
169123
170-
### Multi-Namespace TLS
171-
172-
For multiple namespaces, you can either:
173-
174-
1. **Use the same TLS configuration for all namespaces:**
175-
176-
```yaml
177-
temporal:
178-
namespace: ["ns1", "ns2", "ns3"]
179-
tls:
180-
enabled: true
181-
key: <base64-encoded-key> # Same key for all namespaces
182-
cert: <base64-encoded-cert> # Same cert for all namespaces
183-
ca: <base64-encoded-ca> # Same CA for all namespaces
184-
```
185-
186-
2. **Use different TLS configurations per namespace:**
187-
188-
```yaml
189-
temporal:
190-
namespace: ["ns1", "ns2", "ns3"]
191-
tls:
192-
enabled: true
193-
keys: ["<base64-key1>", "<base64-key2>", "<base64-key3>"]
194-
certs: ["<base64-cert1>", "<base64-cert2>", "<base64-cert3>"]
195-
cas: ["<base64-ca1>", "<base64-ca2>", "<base64-ca3>"]
196-
```
197-
198-
3. **Mix single and array values (arrays take precedence):**
199-
200-
```yaml
201-
temporal:
202-
namespace: ["ns1", "ns2", "ns3"]
203-
tls:
204-
enabled: true
205-
keys: ["<base64-key1>", "<base64-key2>"] # ns3 will reuse key2
206-
certs: ["<base64-cert1>", "<base64-cert2>"] # ns3 will reuse cert2
207-
ca: "<base64-shared-ca>" # Same CA for all namespaces
208-
```
209-
210124
## Prometheus Metrics Integration
211125
212126
### Basic Metrics
@@ -299,21 +213,6 @@ additionalEnv:
299213

300214
## Examples
301215

302-
### Deploy workers with multiple namespaces
303-
304-
```bash
305-
helm install benchmark-workers oci://ghcr.io/temporalio/charts/benchmark-workers \
306-
--set temporal.namespace="{namespace1,namespace2,namespace3}"
307-
```
308-
309-
### Deploy with different endpoints per namespace
310-
311-
```bash
312-
helm install benchmark-workers oci://ghcr.io/temporalio/charts/benchmark-workers \
313-
--set temporal.namespace="{namespace1,namespace2}" \
314-
--set temporal.grpcEndpoint="{temporal1.temporal:7233,temporal2.temporal:7233}"
315-
```
316-
317216
### Deploy workers with increased pollers
318217

319218
```bash
@@ -329,11 +228,10 @@ helm install benchmark-workers oci://ghcr.io/temporalio/charts/benchmark-workers
329228
--set soakTest.concurrentWorkflows=50
330229
```
331230

332-
### Deploy with TLS enabled for multiple namespaces
231+
### Deploy with TLS enabled
333232

334233
```bash
335234
helm install benchmark-workers oci://ghcr.io/temporalio/charts/benchmark-workers \
336-
--set temporal.namespace="{namespace1,namespace2}" \
337235
--set temporal.tls.enabled=true \
338236
--set-file temporal.tls.key=/path/to/key.pem \
339237
--set-file temporal.tls.cert=/path/to/cert.pem \

0 commit comments

Comments
 (0)