Skip to content

Commit 97941f8

Browse files
committed
feat(chart): Configure fixed-sized thread pool for the Distributor to create new sessions
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent c419716 commit 97941f8

File tree

11 files changed

+128
-99
lines changed

11 files changed

+128
-99
lines changed

Diff for: .github/workflows/helm-chart-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ jobs:
4040
test-existing-keda: true
4141
- k8s-version: 'v1.26.15'
4242
test-strategy: deployment
43-
cluster: 'kind'
43+
cluster: 'minikube'
4444
helm-version: 'v3.11.3'
4545
test-existing-keda: true
4646
- k8s-version: 'v1.27.12'
4747
test-strategy: job_https
48-
cluster: 'kind'
48+
cluster: 'minikube'
4949
helm-version: 'v3.12.3'
5050
test-existing-keda: true
5151
- k8s-version: 'v1.28.8'

Diff for: Distributor/start-selenium-grid-distributor.sh

+5
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ if [ ! -z "$SE_REJECT_UNSUPPORTED_CAPS" ]; then
9393
SE_OPTS="$SE_OPTS --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}"
9494
fi
9595

96+
if [ ! -z "$SE_NEW_SESSION_THREAD_POOL_SIZE" ]; then
97+
echo "Appending Selenium options: --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}"
98+
SE_OPTS="$SE_OPTS --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}"
99+
fi
100+
96101
EXTRA_LIBS=""
97102

98103
if [ "$SE_ENABLE_TRACING" = "true" ]; then

Diff for: Hub/start-selenium-grid-hub.sh

+5
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ if [ ! -z "$SE_REJECT_UNSUPPORTED_CAPS" ]; then
6666
SE_OPTS="$SE_OPTS --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}"
6767
fi
6868

69+
if [ ! -z "$SE_NEW_SESSION_THREAD_POOL_SIZE" ]; then
70+
echo "Appending Selenium options: --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}"
71+
SE_OPTS="$SE_OPTS --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}"
72+
fi
73+
6974
EXTRA_LIBS=""
7075

7176
if [ "$SE_ENABLE_TRACING" = "true" ]; then

Diff for: Standalone/start-selenium-standalone.sh

+5
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ if [ ! -z "$SE_REJECT_UNSUPPORTED_CAPS" ]; then
7070
SE_OPTS="$SE_OPTS --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}"
7171
fi
7272

73+
if [ ! -z "$SE_NEW_SESSION_THREAD_POOL_SIZE" ]; then
74+
echo "Appending Selenium options: --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}"
75+
SE_OPTS="$SE_OPTS --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}"
76+
fi
77+
7378
/opt/bin/generate_config
7479

7580
echo "Selenium Grid Standalone configuration: "

Diff for: charts/selenium-grid/README.md

+93-91
Large diffs are not rendered by default.

Diff for: charts/selenium-grid/templates/distributor-deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ spec:
5252
value: '{{ template "seleniumGrid.sessionQueue.fullname" . }}.{{ .Release.Namespace }}'
5353
- name: SE_SESSION_QUEUE_PORT
5454
value: {{ .Values.components.sessionQueue.port | quote }}
55+
{{- with .Values.components.distributor.newSessionThreadPoolSize }}
56+
- name: SE_NEW_SESSION_THREAD_POOL_SIZE
57+
value: {{ . | quote }}
58+
{{- end }}
5559
{{- with .Values.components.extraEnvironmentVariables }}
5660
{{- tpl (toYaml .) $ | nindent 12 }}
5761
{{- end }}

Diff for: charts/selenium-grid/templates/hub-deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ spec:
109109
- name: SE_DISABLE_UI
110110
value: {{ .Values.hub.disableUI | quote }}
111111
{{- end }}
112+
{{- with .Values.hub.newSessionThreadPoolSize }}
113+
- name: SE_NEW_SESSION_THREAD_POOL_SIZE
114+
value: {{ . | quote }}
115+
{{- end }}
112116
{{- with .Values.hub.extraEnvironmentVariables }}
113117
{{- tpl (toYaml .) $ | nindent 12 }}
114118
{{- end }}

Diff for: charts/selenium-grid/templates/router-deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ spec:
5959
- name: SE_SUB_PATH
6060
value: {{ . | quote }}
6161
{{- end }}
62-
{{- if .Values.components.disableUI }}
62+
{{- if .Values.components.router.disableUI }}
6363
- name: SE_DISABLE_UI
64-
value: {{ .Values.components.disableUI | quote }}
64+
value: {{ .Values.components.router.disableUI | quote }}
6565
{{- end }}
6666
{{- with .Values.components.extraEnvironmentVariables }}
6767
{{- tpl (toYaml .) $ | nindent 12 }}

Diff for: charts/selenium-grid/values.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ components:
201201
# Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/)
202202
imagePullSecret: ""
203203

204+
# Disable the Grid UI
205+
disableUI: false
204206
# Custom annotations for router pods
205207
annotations: {}
206208
# Router port
@@ -263,6 +265,8 @@ components:
263265
# Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/)
264266
imagePullSecret: ""
265267

268+
# Configure fixed-sized thread pool for the Distributor to create new sessions as it consumes new session requests from the queue
269+
newSessionThreadPoolSize:
266270
# Custom annotations for Distributor pods
267271
annotations: {}
268272
# Distributor port
@@ -387,8 +391,6 @@ components:
387391

388392
# Custom sub path for all components
389393
subPath: ""
390-
# Disable the Grid UI
391-
disableUI: false
392394

393395
# Custom environment variables for all components
394396
extraEnvironmentVariables:
@@ -425,6 +427,8 @@ hub:
425427
labels: {}
426428
# Disable the Grid UI
427429
disableUI: false
430+
# Configure fixed-sized thread pool for the Distributor to create new sessions as it consumes new session requests from the queue
431+
newSessionThreadPoolSize:
428432
# Port where events are published
429433
publishPort: 4442
430434
publishNodePort: 31442

Diff for: tests/charts/templates/render/dummy.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ isolateComponents: true
6262

6363
components:
6464
subPath: *gridAppRoot
65-
disableUI: true
6665
router:
66+
disableUI: true
6767
annotations:
6868
"restartOnUpdate": "true"
6969
serviceType: NodePort

Diff for: tests/charts/templates/render/dummy_solution.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ selenium-grid:
6363

6464
components:
6565
subPath: *gridAppRoot
66-
disableUI: true
6766
router:
67+
disableUI: true
6868
serviceType: NodePort
6969
distributor:
7070
serviceType: NodePort

0 commit comments

Comments
 (0)