Skip to content

Commit b41b627

Browse files
committed
chart: set job scaling strategy to accurate by default
[deploy] Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent a862efa commit b41b627

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Diff for: Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CURRENT_DATE := $(shell date '+%Y%m%d')
33
BUILD_DATE := $(or $(BUILD_DATE),$(BUILD_DATE),$(CURRENT_DATE))
44
BASE_RELEASE := $(or $(BASE_RELEASE),$(BASE_RELEASE),selenium-4.26.0)
55
BASE_VERSION := $(or $(BASE_VERSION),$(BASE_VERSION),4.26.0)
6-
BINDING_VERSION := $(or $(BINDING_VERSION),$(BINDING_VERSION),4.26.0)
6+
BINDING_VERSION := $(or $(BINDING_VERSION),$(BINDING_VERSION),4.26.1)
77
BASE_RELEASE_NIGHTLY := $(or $(BASE_RELEASE_NIGHTLY),$(BASE_RELEASE_NIGHTLY),nightly)
88
BASE_VERSION_NIGHTLY := $(or $(BASE_VERSION_NIGHTLY),$(BASE_VERSION_NIGHTLY),4.27.0-SNAPSHOT)
99
VERSION := $(or $(VERSION),$(VERSION),4.26.0)
@@ -932,7 +932,7 @@ chart_test_autoscaling_deployment:
932932
./tests/charts/make/chart_test.sh DeploymentAutoscaling
933933

934934
chart_test_autoscaling_job_https:
935-
PLATFORMS=$(PLATFORMS) TEST_EXISTING_KEDA=true RELEASE_NAME=selenium CHART_ENABLE_BASIC_AUTH=true SELENIUM_GRID_MONITORING=false \
935+
PLATFORMS=$(PLATFORMS) TEST_EXISTING_KEDA=true RELEASE_NAME=selenium CHART_ENABLE_BASIC_AUTH=true SELENIUM_GRID_MONITORING=false SCALING_STRATEGY=accurate \
936936
SECURE_CONNECTION_SERVER=true SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_PORT=443 SUB_PATH=/ \
937937
MAX_SESSIONS_FIREFOX=1 MAX_SESSIONS_EDGE=2 MAX_SESSIONS_CHROME=3 TEST_NAME_OVERRIDE=true \
938938
VERSION=$(TAG_VERSION) VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) KEDA_BASED_NAME=$(KEDA_BASED_NAME) KEDA_BASED_TAG=$(KEDA_BASED_TAG) NAMESPACE=$(NAMESPACE) BINDING_VERSION=$(BINDING_VERSION) BASE_VERSION=$(BASE_VERSION) EXTERNAL_UPLOADER_CONFIG=true \
@@ -947,14 +947,14 @@ chart_test_autoscaling_job_hostname:
947947
./tests/charts/make/chart_test.sh JobAutoscaling
948948

949949
chart_test_autoscaling_job:
950-
PLATFORMS=$(PLATFORMS) TEST_EXISTING_KEDA=true TEST_CHROMIUM=true RELEASE_NAME=selenium CHART_ENABLE_TRACING=true CHART_FULL_DISTRIBUTED_MODE=true SELENIUM_GRID_MONITORING=false \
950+
PLATFORMS=$(PLATFORMS) TEST_EXISTING_KEDA=true TEST_CHROMIUM=true RELEASE_NAME=selenium CHART_ENABLE_TRACING=true CHART_FULL_DISTRIBUTED_MODE=true SELENIUM_GRID_MONITORING=false SCALING_STRATEGY=accurate \
951951
SECURE_INGRESS_ONLY_CONFIG_INLINE=true SECURE_USE_EXTERNAL_CERT=true CHART_ENABLE_INGRESS_HOSTNAME=true SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_HOST=selenium-grid.prod SUB_PATH=/ SELENIUM_GRID_PORT=443 \
952952
VERSION=$(TAG_VERSION) VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) KEDA_BASED_NAME=$(KEDA_BASED_NAME) KEDA_BASED_TAG=$(KEDA_BASED_TAG) NAMESPACE=$(NAMESPACE) BINDING_VERSION=$(BINDING_VERSION) BASE_VERSION=$(BASE_VERSION) \
953953
TEMPLATE_OUTPUT_FILENAME="k8s_fullDistributed_secureIngress_externalCerts_ingressHostName_ingressTLSInline_autoScaling_scaledJob_existingKEDA_prefixSelenium_nodeChromium_enableTracing.yaml" \
954954
./tests/charts/make/chart_test.sh JobAutoscaling
955955

956956
chart_test_autoscaling_playwright_connect_grid:
957-
PLATFORMS=$(PLATFORMS) CHART_ENABLE_TRACING=true CHART_ENABLE_BASIC_AUTH=true MATRIX_TESTS=CDPTests \
957+
PLATFORMS=$(PLATFORMS) CHART_ENABLE_TRACING=true CHART_ENABLE_BASIC_AUTH=true MATRIX_TESTS=CDPTests SCALING_STRATEGY=accurate \
958958
BASIC_AUTH_USERNAME=docker-selenium BASIC_AUTH_PASSWORD=2NMI4jdBi6k7bENoeUfV25295VvzwAE9chM24a+2VL95uOHozo \
959959
SECURE_INGRESS_ONLY_DEFAULT=true SECURE_USE_EXTERNAL_CERT=true SELENIUM_GRID_PROTOCOL=https SELENIUM_GRID_HOST=$$(hostname -i) SELENIUM_GRID_PORT=443 \
960960
VERSION=$(TAG_VERSION) VIDEO_TAG=$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) KEDA_BASED_NAME=$(KEDA_BASED_NAME) KEDA_BASED_TAG=$(KEDA_BASED_TAG) NAMESPACE=$(NAMESPACE) BINDING_VERSION=$(BINDING_VERSION) BASE_VERSION=$(BASE_VERSION) \

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
339339
| autoscaling.scaledOptions.minReplicaCount | int | `0` | Minimum number of replicas |
340340
| autoscaling.scaledOptions.maxReplicaCount | int | `8` | Maximum number of replicas |
341341
| autoscaling.scaledOptions.pollingInterval | int | `10` | Polling interval in seconds |
342-
| autoscaling.scaledJobOptions.scalingStrategy.strategy | string | `"default"` | Scaling strategy for KEDA ScaledJob |
342+
| autoscaling.scaledJobOptions.scalingStrategy.strategy | string | `"accurate"` | Scaling strategy for KEDA ScaledJob |
343343
| autoscaling.scaledJobOptions.successfulJobsHistoryLimit | int | `0` | Number of Completed jobs should be kept |
344344
| autoscaling.scaledJobOptions.failedJobsHistoryLimit | int | `0` | Number of Failed jobs should be kept (for troubleshooting purposes) |
345345
| autoscaling.scaledJobOptions.jobTargetRef | object | `{"backoffLimit":0,"completions":1,"parallelism":1}` | Specify job target ref for KEDA ScaledJob |

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ autoscaling:
879879
scalingStrategy:
880880
# Offer the strategy default with scaler calculation updated in https://github.com/SeleniumHQ/docker-selenium/tree/trunk/.keda/README.md
881881
# -- Scaling strategy for KEDA ScaledJob
882-
strategy: default
882+
strategy: accurate
883883
# -- Number of Completed jobs should be kept
884884
successfulJobsHistoryLimit: 0
885885
# -- Number of Failed jobs should be kept (for troubleshooting purposes)

Diff for: tests/charts/make/chart_test.sh

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ HUB_CHECKS_INTERVAL=${HUB_CHECKS_INTERVAL:-45}
2222
HUB_CHECKS_MAX_ATTEMPTS=${HUB_CHECKS_MAX_ATTEMPTS:-6}
2323
WEB_DRIVER_WAIT_TIMEOUT=${WEB_DRIVER_WAIT_TIMEOUT:-120}
2424
AUTOSCALING_POLL_INTERVAL=${AUTOSCALING_POLL_INTERVAL:-20}
25+
SCALING_STRATEGY=${SCALING_STRATEGY:-"default"}
2526
SKIP_CLEANUP=${SKIP_CLEANUP:-"true"} # For debugging purposes, retain the cluster after the test run
2627
CHART_CERT_PATH=${CHART_CERT_PATH:-"${CHART_PATH}/certs/tls.crt"}
2728
SSL_CERT_DIR=${SSL_CERT_DIR:-"/etc/ssl/certs"}
@@ -159,11 +160,13 @@ if [ "${SELENIUM_GRID_AUTOSCALING}" = "true" ] && [ "${TEST_EXISTING_KEDA}" = "t
159160
HELM_COMMAND_SET_IMAGES="${HELM_COMMAND_SET_IMAGES} \
160161
--set autoscaling.enabled=false \
161162
--set autoscaling.enableWithExistingKEDA=true \
163+
--set autoscaling.scaledJobOptions.scalingStrategy.strategy=${SCALING_STRATEGY} \
162164
"
163165
elif [ "${SELENIUM_GRID_AUTOSCALING}" = "true" ] && [ "${TEST_EXISTING_KEDA}" = "false" ]; then
164166
HELM_COMMAND_SET_IMAGES="${HELM_COMMAND_SET_IMAGES} \
165167
--set autoscaling.enabled=true \
166168
--set autoscaling.enableWithExistingKEDA=false \
169+
--set autoscaling.scaledJobOptions.scalingStrategy.strategy=${SCALING_STRATEGY} \
167170
"
168171
fi
169172

0 commit comments

Comments
 (0)