Skip to content

Commit c8907a6

Browse files
committed
Refactor values.
1 parent 74bb078 commit c8907a6

4 files changed

Lines changed: 40 additions & 25 deletions

File tree

charts/benchmark-workers/README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ The following table lists the configurable parameters for the benchmark-workers
5353

5454
| Parameter | Description | Default |
5555
|-----------|-------------|---------|
56-
| `replicaCount.workers` | Number of worker pods | `1` |
57-
| `replicaCount.soakTest` | Number of soak test pods | `1` |
5856
| `image.repository` | Image repository | `ghcr.io/temporalio/benchmark-workers` |
5957
| `image.tag` | Image tag | `latest` |
6058
| `image.pullPolicy` | Image pull policy | `Always` |
@@ -69,18 +67,25 @@ The following table lists the configurable parameters for the benchmark-workers
6967
| `temporal.tls.ca` | TLS CA certificate content (base64 encoded) | `""` |
7068
| `temporal.tls.existingSecret` | Use existing Kubernetes secret for TLS | `""` |
7169
| `temporal.tls.disableHostVerification` | Disable TLS host verification | `false` |
72-
| `metrics.enabled` | Enable Prometheus metrics | `false` |
70+
| `metrics.enabled` | Enable Prometheus metrics | `true` |
7371
| `metrics.port` | Port to expose metrics on | `9090` |
7472
| `metrics.prometheusEndpoint` | Prometheus metrics endpoint | `:9090` |
7573
| `metrics.service.annotations` | Annotations for the metrics service | `{}` |
76-
| `metrics.serviceMonitor.enabled` | Enable ServiceMonitor for Prometheus Operator | `false` |
74+
| `metrics.serviceMonitor.enabled` | Enable ServiceMonitor for Prometheus Operator | `true` |
7775
| `metrics.serviceMonitor.additionalLabels` | Additional labels for the ServiceMonitor | `{}` |
7876
| `metrics.serviceMonitor.interval` | Scrape interval | `15s` |
7977
| `metrics.serviceMonitor.scrapeTimeout` | Scrape timeout | `10s` |
78+
| `workers.replicaCount` | Number of worker pods | `1` |
79+
| `workers.resources` | Resource requests and limits for worker pods | `{}` |
8080
| `soakTest.enabled` | Enable soak test deployment | `true` |
81+
| `soakTest.replicaCount` | Number of soak test pods | `1` |
8182
| `soakTest.concurrentWorkflows` | Number of concurrent workflows | `10` |
8283
| `soakTest.workflowType` | Workflow type to execute | `ExecuteActivity` |
8384
| `soakTest.workflowArgs` | Arguments for the workflow | `{ "Count": 3, "Activity": "Echo", "Input": { "Message": "test" } }` |
85+
| `soakTest.resources` | Resource requests and limits for soak test pods | `{}` |
86+
| `nodeSelector` | Node labels for pod assignment | `{}` |
87+
| `tolerations` | Tolerations for pod assignment | `[]` |
88+
| `affinity` | Affinity for pod assignment | `{}` |
8489

8590
## TLS Configuration
8691

@@ -179,4 +184,12 @@ helm install benchmark-workers oci://ghcr.io/temporalio/charts/benchmark-workers
179184
helm install benchmark-workers oci://ghcr.io/temporalio/charts/benchmark-workers \
180185
--set metrics.enabled=true \
181186
--set metrics.serviceMonitor.enabled=true
187+
```
188+
189+
### Scale worker or soak test replicas
190+
191+
```bash
192+
helm install benchmark-workers oci://ghcr.io/temporalio/charts/benchmark-workers \
193+
--set workers.replicaCount=3 \
194+
--set soakTest.replicaCount=2
182195
```

charts/benchmark-workers/templates/deployment-soak-test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
component: soak-test
99
{{- include "benchmark-workers.labels" . | nindent 4 }}
1010
spec:
11-
replicas: {{ .Values.replicaCount.soakTest }}
11+
replicas: {{ .Values.soakTest.replicaCount }}
1212
selector:
1313
matchLabels:
1414
app: benchmark
@@ -54,9 +54,9 @@ spec:
5454
- "-t"
5555
- {{ .Values.soakTest.workflowType | quote }}
5656
- {{ .Values.soakTest.workflowArgs | quote }}
57-
{{- if .Values.resources.soakTest }}
57+
{{- if .Values.soakTest.resources }}
5858
resources:
59-
{{- toYaml .Values.resources.soakTest | nindent 10 }}
59+
{{- toYaml .Values.soakTest.resources | nindent 10 }}
6060
{{- end }}
6161
{{- if .Values.temporal.tls.enabled }}
6262
volumeMounts:

charts/benchmark-workers/templates/deployment-workers.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
component: workers
88
{{- include "benchmark-workers.labels" . | nindent 4 }}
99
spec:
10-
replicas: {{ .Values.replicaCount.workers }}
10+
replicas: {{ .Values.workers.replicaCount }}
1111
selector:
1212
matchLabels:
1313
app: benchmark
@@ -57,9 +57,9 @@ spec:
5757
value: "true"
5858
{{- end }}
5959
{{- end }}
60-
{{- if .Values.resources.workers }}
60+
{{- if .Values.workers.resources }}
6161
resources:
62-
{{- toYaml .Values.resources.workers | nindent 10 }}
62+
{{- toYaml .Values.workers.resources | nindent 10 }}
6363
{{- end }}
6464
{{- if .Values.temporal.tls.enabled }}
6565
volumeMounts:

charts/benchmark-workers/values.yaml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
# Default values for benchmark-workers chart
2-
replicaCount:
3-
workers: 1
4-
soakTest: 1
2+
nameOverride: ""
3+
fullnameOverride: ""
54

65
image:
76
repository: ghcr.io/temporalio/benchmark-workers
87
tag: latest
98
pullPolicy: Always
109

11-
nameOverride: ""
12-
fullnameOverride: ""
13-
1410
temporal:
1511
grpcEndpoint: "temporal-frontend.temporal:7233"
1612
namespace: "default"
@@ -46,21 +42,27 @@ metrics:
4642
# Scrape timeout
4743
scrapeTimeout: 10s
4844

49-
soakTest:
50-
enabled: true
51-
concurrentWorkflows: "10"
52-
workflowType: "ExecuteActivity"
53-
workflowArgs: '{ "Count": 3, "Activity": "Echo", "Input": { "Message": "test" } }'
54-
55-
resources:
56-
workers: {}
45+
workers:
46+
# Number of worker replicas
47+
replicaCount: 1
48+
# Resources configuration
49+
resources: {}
5750
# limits:
5851
# cpu: 1000m
5952
# memory: 1Gi
6053
# requests:
6154
# cpu: 500m
6255
# memory: 512Mi
63-
soakTest: {}
56+
57+
soakTest:
58+
enabled: true
59+
# Number of soak test replicas
60+
replicaCount: 1
61+
concurrentWorkflows: "10"
62+
workflowType: "ExecuteActivity"
63+
workflowArgs: '{ "Count": 3, "Activity": "Echo", "Input": { "Message": "test" } }'
64+
# Resources configuration
65+
resources: {}
6466
# limits:
6567
# cpu: 500m
6668
# memory: 512Mi

0 commit comments

Comments
 (0)