Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit acb7fe7

Browse files
committed
feat(chart): Add node registration secret to exec preStop container
Update default scalingStrategy.strategy: accurate [skip ci] Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 19b1df5 commit acb7fe7

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

charts/selenium-grid/configs/node/nodePreStop.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#!/bin/bash
2+
if [ ! -z "${SE_REGISTRATION_SECRET}" ];
3+
then
4+
HEADERS="X-REGISTRATION-SECRET: ${SE_REGISTRATION_SECRET}"
5+
else
6+
HEADERS="X-REGISTRATION-SECRET;"
7+
fi
8+
29
if curl -sfk ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/status; then
3-
curl -k -X POST ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/se/grid/node/drain --header 'X-REGISTRATION-SECRET;'
10+
curl -k -X POST ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/se/grid/node/drain --header "${HEADERS}"
411
while curl -sfk ${SE_SERVER_PROTOCOL}://127.0.0.1:${SE_NODE_PORT}/status; do sleep 1; done
512
else
613
echo "Node is already drained. Shutting down gracefully!"

charts/selenium-grid/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Secret TLS fullname
177177
Is registration secret enabled
178178
*/}}
179179
{{- define "seleniumGrid.tls.registrationSecret.enabled" -}}
180-
{{- and .Values.tls.enabled .Values.tls.registrationSecret.enabled | ternary "true" "" -}}
180+
{{- .Values.tls.registrationSecret.enabled | ternary "true" "" -}}
181181
{{- end -}}
182182

183183
{{/*

charts/selenium-grid/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ autoscaling:
517517
scaledJobOptions:
518518
scalingStrategy:
519519
# Change this to "accurate" when the calculation problem is fixed
520-
strategy: default
520+
strategy: accurate
521521
# Number of Completed jobs should be kept
522522
successfulJobsHistoryLimit: 0
523523
# Number of Failed jobs should be kept (for troubleshooting purposes)

tests/charts/ci/JobAutoscaling-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ isolateComponents: false
33
autoscaling:
44
enableWithExistingKEDA: true
55
scalingType: job
6-
strategy: default
6+
strategy: accurate
77
scaledOptions:
88
minReplicaCount: 0
99
maxReplicaCount: 5

tests/charts/refValues/sample-aws.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ autoscaling:
4444
successfulJobsHistoryLimit: 0
4545
failedJobsHistoryLimit: 5
4646
scalingStrategy:
47-
strategy: default
47+
strategy: accurate
4848

4949
hub:
5050
subPath: *gridAppRoot

tests/charts/refValues/simplex-minikube.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ autoscaling:
5656
successfulJobsHistoryLimit: 0
5757
failedJobsHistoryLimit: 5
5858
scalingStrategy:
59-
strategy: default
59+
strategy: accurate
6060

6161
hub:
6262
subPath: *gridAppRoot

0 commit comments

Comments
 (0)