Skip to content

Commit 8e0493f

Browse files
authored
feat(stresstesting-bridges-load-generator): locust metrics collection (#82)
* feat(stresstesting-bridges-load-generator): add environment variables for API key and GitHub token in deployment configuration * chore(stresstesting-bridges-load-generator): bump chart version to 0.2.0 * fix(stresstesting-bridges-load-generator): update image repository to use GitHub Container Registry * fix(stresstesting-bridges-load-generator): update deployment and service configurations to use HTTP probes and correct target port * feat(stresstesting-bridges-load-generator): add metrics service and ingress path for metrics endpoint * fix(stresstesting-bridges-load-generator): add login step for GitHub Container Registry in release workflow * fix(stresstesting-bridges-load-generator): add missing exclude patterns to load test configuration in NOTES.txt * fix(stresstesting-bridges-load-generator): remove liveness probe from deployment configuration * fix(stresstesting-bridges-load-generator): update image pull policy to Always in values.yaml * fix(stresstesting-bridges-load-generator): add metrics configuration and VMPodScrape resource for Prometheus metrics collection * fix(stresstesting-bridges-load-generator): update image repository to use AWS ECR * fix(stresstesting-bridges-load-generator): remove GitHub Container Registry login step from release workflow * fix(stresstesting-bridges-load-generator): update chart version to 1.0.0 in Chart.yaml * fix(stresstesting-bridges-load-generator): update image repository to use AWS ECR * fix(stresstesting-bridges-load-generator): add nodeSelector and tolerations to deployment spec * fix(stresstesting-bridges-load-generator): update nodeSelector and tolerations in deployment spec * fix(stresstesting-bridges-load-generator): remove imagePullSecrets from deployment spec
1 parent f957cc9 commit 8e0493f

File tree

6 files changed

+50
-12
lines changed

6 files changed

+50
-12
lines changed

charts/stresstesting-bridges-load-generator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ keywords:
1212
- load-generator
1313
- locust
1414
- stress-test
15-
version: 0.3.0
15+
version: 1.0.0
1616
appVersion: "latest"

charts/stresstesting-bridges-load-generator/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Configure resources for the load generator pod itself:
148148
|-----------|-------------|---------|
149149
| `kubeconfigYaml` | Base64-encoded kubeconfig (required) | `""` |
150150
| `cluster` | Bright cluster URL | `"https://development.playground.brightsec.com"` |
151-
| `image.repository` | Image repository | `ghcr.io/neuralegion/stresstesting-bridges-load-generator` |
151+
| `image.repository` | Image repository | `454884832027.dkr.ecr.us-east-1.amazonaws.com/stresstesting-bridges-load-generator` |
152152
| `image.tag` | Image tag | `"latest"` |
153153

154154
## Accessing the Locust Web UI

charts/stresstesting-bridges-load-generator/templates/NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Load Test Configuration:
55
Duration: {{ .Values.loadTest.duration }} minutes
66
Concurrency: {{ .Values.loadTest.concurrency }}
77
Behavioral Pattern: {{ .Values.behavioralPattern }}
8+
Exclude patterns: {{ .Values.excludeBehavioralPatterns }}
89
Cluster: {{ .Values.cluster }}
910

1011
{{- if .Values.ingress.enabled }}

charts/stresstesting-bridges-load-generator/templates/deployment.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ spec:
1515
labels:
1616
{{- include "stresstesting-bridges-load-generator.labels" . | nindent 8 }}
1717
spec:
18-
imagePullSecrets:
19-
- name: pull-ghcr-io
18+
nodeSelector:
19+
service: "stresstesting-bridges-load-generator"
20+
tolerations:
21+
- key: stressbridgesapihost
22+
operator: Equal
23+
value: "true"
24+
effect: NoSchedule
2025
serviceAccountName: {{ include "stresstesting-bridges-load-generator.serviceAccountName" . }}
2126
containers:
2227
- name: load-generator
@@ -29,12 +34,6 @@ spec:
2934
- name: metrics
3035
containerPort: 9646
3136
protocol: TCP
32-
livenessProbe:
33-
httpGet:
34-
path: /
35-
port: web-ui
36-
initialDelaySeconds: 60
37-
periodSeconds: 30
3837
readinessProbe:
3938
httpGet:
4039
path: /
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{{- if .Values.metrics.vmPodScrape.enabled }}
2+
---
3+
apiVersion: operator.victoriametrics.com/v1beta1
4+
kind: VMPodScrape
5+
metadata:
6+
name: {{ include "stresstesting-bridges-load-generator.fullname" . }}
7+
namespace: {{ .Values.metrics.vmPodScrape.namespace | default .Release.Namespace }}
8+
labels:
9+
{{- include "stresstesting-bridges-load-generator.labels" . | nindent 4 }}
10+
{{- with .Values.metrics.vmPodScrape.labels }}
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
13+
spec:
14+
podMetricsEndpoints:
15+
- port: {{ .Values.metrics.vmPodScrape.port | quote }}
16+
path: {{ .Values.metrics.vmPodScrape.path }}
17+
scheme: {{ .Values.metrics.vmPodScrape.scheme }}
18+
selector:
19+
matchLabels:
20+
{{- include "stresstesting-bridges-load-generator.selectorLabels" . | nindent 6 }}
21+
{{- end }}

charts/stresstesting-bridges-load-generator/values.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Load Generator Image Configuration
22
image:
3-
repository: "ghcr.io/neuralegion/stresstesting-bridges-load-generator"
3+
repository: "454884832027.dkr.ecr.us-east-1.amazonaws.com/stresstesting-bridges-load-generator"
44
tag: "latest"
5-
pullPolicy: IfNotPresent
5+
pullPolicy: Always
66

77
# Kubernetes cluster configuration (base64-encoded kubeconfig)
88
# This is required for the load generator to deploy test targets
@@ -95,3 +95,20 @@ serviceAccount:
9595
automount: true
9696
annotations: {}
9797
name: ""
98+
99+
# Metrics configuration
100+
metrics:
101+
# VictoriaMetrics PodScrape configuration for Prometheus metrics collection
102+
vmPodScrape:
103+
enabled: true
104+
# Namespace where the VMPodScrape resource will be created
105+
# Defaults to the release namespace if not specified
106+
namespace: ""
107+
# Port name to scrape metrics from (must match the port name in the service)
108+
port: "metrics"
109+
# Path to scrape metrics from
110+
path: /metrics
111+
# Scheme to use for scraping (http or https)
112+
scheme: http
113+
# Additional labels to add to the VMPodScrape resource
114+
labels: {}

0 commit comments

Comments
 (0)