Skip to content

Commit f90d1ee

Browse files
authored
Unified configs for Dynamic Grid Docker and Kubernetes (#3088)
Signed-off-by: Viet Nguyen Duc <viet.dnguyen@katalon.com>
1 parent ccd697c commit f90d1ee

26 files changed

Lines changed: 254 additions & 93 deletions

ENV_VARIABLES.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
|--------------|---------------|-------------|----------------------|
33
| SE_SCREEN_WIDTH | 1920 | Use in Node to set the screen width | |
44
| SE_SCREEN_HEIGHT | 1080 | Use in Node to set the screen height | |
5-
| SE_VIDEO_FILE_NAME | video.mp4 | Use in function video recording to set the output file name. Set `auto` for dynamic file name relying on test metadata | |
5+
| SE_VIDEO_FILE_NAME | auto | Use in function video recording to set the output file name. Set `auto` for dynamic file name relying on test metadata | |
66
| SE_FRAME_RATE | 15 | Set the frame rate for FFmpeg in video recording | |
77
| SE_CODEC | libx264 | Set the codec for FFmpeg in video recording | |
88
| SE_PRESET | -preset ultrafast | Set the preset for FFmpeg in video recording | |
@@ -107,8 +107,8 @@
107107
| SE_VIDEO_CONTAINER_NAME | | | |
108108
| SE_RECORD_VIDEO | true | | |
109109
| SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP | false | | |
110-
| SE_NODE_MAX_SESSIONS | 1 | | |
111-
| SE_NODE_OVERRIDE_MAX_SESSIONS | false | | |
110+
| SE_NODE_MAX_SESSIONS | 1 | Set the number of maximum concurrent sessions per browser Node, by default is 1 | --max-sessions |
111+
| SE_NODE_OVERRIDE_MAX_SESSIONS | false | By default is false, enable this flag for setting max session take effect in browser Node | --override-max-sessions |
112112
| SE_OFFLINE | true | Selenium Manager offline mode, use the browser and driver pre-configured in the image | |
113113
| SE_NODE_BROWSER_VERSION | stable | Overwrite the default browserVersion in Node stereotype. By default, it is short version of current browser installed in Node. For example `139.0` | |
114114
| SE_NODE_PLATFORM_NAME | Linux | Overwrite the default platformName in Node stereotype. By default, it is `Linux` | |
@@ -166,3 +166,5 @@
166166
| SE_UPLOAD_FAILURE_SESSION_ONLY | false | When true, only recording of sessions that are not exited normally (session timed out, or custom events were fired by the client match with failure events defined) | |
167167
| SE_VIDEO_EVENT_DRIVEN | true | Backend of video recorder and uploader will subscribe to Grid Event Bus for session event lifecycle for processing instead of traditional polling Node session capabilities via /status endpoint. | |
168168
| SE_PLAIN_LOGS | true | Use plain log lines | --plain-logs |
169+
| SE_DYNAMIC_MAX_SESSIONS | | Set the number of maximum concurrent sessions of Dynamic Node (both Docker and Kubernetes) | |
170+
| SE_DYNAMIC_OVERRIDE_MAX_SESSIONS | | Enable this flag for setting max session take effect in Dynamic Node (both Docker and Kubernetes) | |

NodeDocker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ ENV SE_OTEL_SERVICE_NAME="selenium-node-docker" \
3333
SE_EVENT_BUS_PUBLISH_PORT="4442" \
3434
SE_EVENT_BUS_SUBSCRIBE_PORT="4443" \
3535
SE_NODE_DOCKER_CONFIG_FILENAME="docker.toml" \
36-
SE_NODE_ENABLE_MANAGED_DOWNLOADS="true"
36+
SE_NODE_ENABLE_MANAGED_DOWNLOADS="true" \
37+
SE_DYNAMIC_MAX_SESSIONS="" \
38+
SE_DYNAMIC_OVERRIDE_MAX_SESSIONS=""

NodeDocker/config.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ host-config-keys = ["Dns", "DnsOptions", "DnsSearch", "ExtraHosts", "Binds"]
1515
# To have Docker listening through tcp on macOS, install socat and run the following command
1616
# socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock
1717
url = "http://127.0.0.1:2375"
18-
# Docker image used for video recording
19-
video-image = "selenium/video:ffmpeg-8.0-20260202"
18+
# Docker image used for video recording (set to "false" to disable. Recommend to use new browser
19+
# image tag which has video recorder/uploader inline).
20+
# video-image = "selenium/video:ffmpeg-8.0-20260202"
2021

2122
# Uncomment the following section if you are running the node on a separate VM
2223
# Fill out the placeholders with appropriate values

NodeDocker/start-selenium-grid-docker.sh

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,48 @@ if [ ! -z "$SE_OPTS" ]; then
4343
echo "Appending Selenium options: ${SE_OPTS}"
4444
fi
4545

46-
if [ ! -z "$SE_NODE_GRID_URL" ]; then
47-
echo "Appending Grid url: ${SE_NODE_GRID_URL}"
48-
SE_GRID_URL="--grid-url ${SE_NODE_GRID_URL}"
46+
# Specific environment variables name for Node Dynamic only, it will not effect browser container when pass through
47+
48+
if [ ! -z "${SE_DYNAMIC_MAX_SESSIONS}" ]; then
49+
append_se_opts "--max-sessions" "${SE_DYNAMIC_MAX_SESSIONS}"
50+
fi
51+
52+
if [ ! -z "${SE_DYNAMIC_OVERRIDE_MAX_SESSIONS}" ]; then
53+
append_se_opts "--override-max-sessions" "${SE_DYNAMIC_OVERRIDE_MAX_SESSIONS}"
54+
fi
55+
56+
# Environment variables will be passed through to browser container
57+
58+
if [ ! -z "${SE_NODE_GRID_URL}" ]; then
59+
append_se_opts "--grid-url" "${SE_NODE_GRID_URL}"
60+
fi
61+
62+
if [ ! -z "${SE_NODE_HEARTBEAT_PERIOD}" ]; then
63+
append_se_opts "--heartbeat-period" "${SE_NODE_HEARTBEAT_PERIOD}"
64+
fi
65+
66+
if [ ! -z "${SE_NODE_REGISTER_PERIOD}" ]; then
67+
append_se_opts "--register-period" "${SE_NODE_REGISTER_PERIOD}"
68+
fi
69+
70+
if [ ! -z "${SE_NODE_REGISTER_CYCLE}" ]; then
71+
append_se_opts "--register-cycle" "${SE_NODE_REGISTER_CYCLE}"
72+
fi
73+
74+
if [ ! -z "${SE_NODE_SESSION_TIMEOUT}" ]; then
75+
append_se_opts "--session-timeout" "${SE_NODE_SESSION_TIMEOUT}"
76+
fi
77+
78+
if [ ! -z "${SE_NODE_ENABLE_CDP}" ]; then
79+
append_se_opts "--enable-cdp" "${SE_NODE_ENABLE_CDP}"
80+
fi
81+
82+
if [ ! -z "${SE_NODE_ENABLE_MANAGED_DOWNLOADS}" ]; then
83+
append_se_opts "--enable-managed-downloads" "${SE_NODE_ENABLE_MANAGED_DOWNLOADS}"
84+
fi
85+
86+
if [ ! -z "${SE_NODE_CONNECTION_LIMIT_PER_SESSION}" ]; then
87+
append_se_opts "--connection-limit-per-session" "${SE_NODE_CONNECTION_LIMIT_PER_SESSION}"
4988
fi
5089

5190
if [ ! -z "$SE_LOG_LEVEL" ]; then
@@ -68,6 +107,10 @@ if [ ! -z "$SE_EXTERNAL_URL" ]; then
68107
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
69108
fi
70109

110+
if [ ! -z "$SE_REGISTRATION_SECRET" ]; then
111+
append_se_opts "--registration-secret" "${SE_REGISTRATION_SECRET}" "false"
112+
fi
113+
71114
if [ "${SE_ENABLE_TLS}" = "true" ]; then
72115
# Configure truststore for the server
73116
if [ ! -z "$SE_JAVA_SSL_TRUST_STORE" ]; then
@@ -168,4 +211,4 @@ java ${SE_JAVA_OPTS} \
168211
--bind-host ${SE_BIND_HOST} \
169212
--detect-drivers false \
170213
--config ${CONFIG_FILE} \
171-
${SE_GRID_URL} ${SE_OPTS}
214+
${SE_OPTS}

NodeKubernetes/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ ENV SE_OTEL_SERVICE_NAME="selenium-node-kubernetes" \
3434
SE_EVENT_BUS_PUBLISH_PORT="4442" \
3535
SE_EVENT_BUS_SUBSCRIBE_PORT="4443" \
3636
SE_NODE_KUBERNETES_CONFIG_FILENAME="kubernetes.toml" \
37-
SE_NODE_ENABLE_MANAGED_DOWNLOADS="true"
37+
SE_NODE_ENABLE_MANAGED_DOWNLOADS="true" \
38+
SE_DYNAMIC_MAX_SESSIONS="" \
39+
SE_DYNAMIC_OVERRIDE_MAX_SESSIONS=""

NodeKubernetes/config.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Configs have a mapping between the container image to use and the capabilities
33
# that need to be matched to start a K8s Job with the given image.
44
configs = [
5-
"selenium/standalone-firefox:4.40.0-20260202", '{"browserName": "firefox", "platformName": "linux"}',
6-
"selenium/standalone-chrome:4.40.0-20260202", '{"browserName": "chrome", "platformName": "linux"}',
7-
"selenium/standalone-edge:4.40.0-20260202", '{"browserName": "MicrosoftEdge", "platformName": "linux"}'
5+
"selenium/standalone-firefox:4.41.0-20260222", '{"browserName": "firefox", "platformName": "linux"}',
6+
"selenium/standalone-chromium:4.41.0-20260222", '{"browserName": "chrome", "platformName": "linux"}',
7+
"selenium/standalone-edge:4.41.0-20260222", '{"browserName": "MicrosoftEdge", "platformName": "linux"}'
88
]
99

1010
# ConfigMap template mode: prefix an entry with "configmap:" to load a full K8s Job
@@ -17,8 +17,9 @@ configs = [
1717
# "configmap:chrome-job-template", '{"browserName": "chrome", "platformName": "linux"}'
1818
# ]
1919

20-
# Docker image used for video recording sidecar (set to "false" to disable)
21-
video-image = "selenium/video:ffmpeg-8.0-20260202"
20+
# Docker image used for video recording (set to "false" to disable. Recommend to use new browser
21+
# image tag which has video recorder/uploader inline).
22+
# video-image = "selenium/video:ffmpeg-8.0-20260202"
2223

2324
# Session assets path — when the Node Pod has a PVC mounted at this path,
2425
# browser Jobs automatically share it for video/logs/capabilities persistence

NodeKubernetes/start-selenium-grid-kubernetes.sh

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,38 @@ if [ ! -z "$SE_OPTS" ]; then
4343
echo "Appending Selenium options: ${SE_OPTS}"
4444
fi
4545

46-
if [ ! -z "$SE_NODE_GRID_URL" ]; then
47-
echo "Appending Grid url: ${SE_NODE_GRID_URL}"
48-
SE_GRID_URL="--grid-url ${SE_NODE_GRID_URL}"
46+
# Specific environment variables name for Node Dynamic only, it will not effect browser container when pass through
47+
48+
if [ ! -z "${SE_DYNAMIC_MAX_SESSIONS}" ]; then
49+
append_se_opts "--max-sessions" "${SE_DYNAMIC_MAX_SESSIONS}"
50+
fi
51+
52+
if [ ! -z "${SE_DYNAMIC_OVERRIDE_MAX_SESSIONS}" ]; then
53+
append_se_opts "--override-max-sessions" "${SE_DYNAMIC_OVERRIDE_MAX_SESSIONS}"
54+
fi
55+
56+
if [ ! -z "${SE_NODE_GRID_URL}" ]; then
57+
append_se_opts "--grid-url" "${SE_NODE_GRID_URL}"
58+
fi
59+
60+
if [ ! -z "${SE_NODE_HEARTBEAT_PERIOD}" ]; then
61+
append_se_opts "--heartbeat-period" "${SE_NODE_HEARTBEAT_PERIOD}"
62+
fi
63+
64+
if [ ! -z "${SE_NODE_SESSION_TIMEOUT}" ]; then
65+
append_se_opts "--session-timeout" "${SE_NODE_SESSION_TIMEOUT}"
66+
fi
67+
68+
if [ ! -z "${SE_NODE_ENABLE_CDP}" ]; then
69+
append_se_opts "--enable-cdp" "${SE_NODE_ENABLE_CDP}"
70+
fi
71+
72+
if [ ! -z "${SE_NODE_ENABLE_MANAGED_DOWNLOADS}" ]; then
73+
append_se_opts "--enable-managed-downloads" "${SE_NODE_ENABLE_MANAGED_DOWNLOADS}"
74+
fi
75+
76+
if [ ! -z "${SE_NODE_CONNECTION_LIMIT_PER_SESSION}" ]; then
77+
append_se_opts "--connection-limit-per-session" "${SE_NODE_CONNECTION_LIMIT_PER_SESSION}"
4978
fi
5079

5180
if [ ! -z "$SE_LOG_LEVEL" ]; then
@@ -177,4 +206,4 @@ java ${SE_JAVA_OPTS} \
177206
--bind-host ${SE_BIND_HOST} \
178207
--detect-drivers false \
179208
--config ${CONFIG_FILE} \
180-
${SE_GRID_URL} ${SE_OPTS}
209+
${SE_OPTS}

StandaloneDocker/start-selenium-grid-docker.sh

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,60 @@ if [ ! -z "$SE_OPTS" ]; then
2828
echo "Appending Selenium options: ${SE_OPTS}"
2929
fi
3030

31-
if [ ! -z "$SE_NODE_GRID_URL" ]; then
32-
echo "Appending Grid url: ${SE_NODE_GRID_URL}"
33-
SE_GRID_URL="--grid-url ${SE_NODE_GRID_URL}"
31+
if [ ! -z "${SE_DISABLE_UI}" ]; then
32+
append_se_opts "--disable-ui" "${SE_DISABLE_UI}"
3433
fi
3534

36-
if [ ! -z "$SE_NODE_ENABLE_MANAGED_DOWNLOADS" ]; then
37-
append_se_opts "--enable-managed-downloads" "${SE_NODE_ENABLE_MANAGED_DOWNLOADS}"
35+
if [ ! -z "${SE_ROUTER_USERNAME}" ]; then
36+
append_se_opts "--username" "${SE_ROUTER_USERNAME}"
3837
fi
3938

40-
if [ ! -z "$SE_NODE_ENABLE_CDP" ]; then
41-
append_se_opts "--enable-cdp" "${SE_NODE_ENABLE_CDP}"
39+
if [ ! -z "${SE_ROUTER_PASSWORD}" ]; then
40+
append_se_opts "--password" "${SE_ROUTER_PASSWORD}" "false"
41+
fi
42+
43+
# Specific environment variables name for Node Dynamic only, it will not effect browser container when pass through
44+
45+
if [ ! -z "${SE_DYNAMIC_MAX_SESSIONS}" ]; then
46+
append_se_opts "--max-sessions" "${SE_DYNAMIC_MAX_SESSIONS}"
47+
fi
48+
49+
if [ ! -z "${SE_DYNAMIC_OVERRIDE_MAX_SESSIONS}" ]; then
50+
append_se_opts "--override-max-sessions" "${SE_DYNAMIC_OVERRIDE_MAX_SESSIONS}"
51+
fi
52+
53+
# Environment variables will be passed through to browser container
54+
55+
if [ ! -z "${SE_NODE_GRID_URL}" ]; then
56+
append_se_opts "--grid-url" "${SE_NODE_GRID_URL}"
57+
fi
58+
59+
if [ ! -z "${SE_NODE_HEARTBEAT_PERIOD}" ]; then
60+
append_se_opts "--heartbeat-period" "${SE_NODE_HEARTBEAT_PERIOD}"
4261
fi
4362

44-
if [ ! -z "$SE_NODE_REGISTER_PERIOD" ]; then
63+
if [ ! -z "${SE_NODE_REGISTER_PERIOD}" ]; then
4564
append_se_opts "--register-period" "${SE_NODE_REGISTER_PERIOD}"
4665
fi
4766

48-
if [ ! -z "$SE_NODE_REGISTER_CYCLE" ]; then
67+
if [ ! -z "${SE_NODE_REGISTER_CYCLE}" ]; then
4968
append_se_opts "--register-cycle" "${SE_NODE_REGISTER_CYCLE}"
5069
fi
5170

52-
if [ ! -z "$SE_NODE_HEARTBEAT_PERIOD" ]; then
53-
append_se_opts "--heartbeat-period" "${SE_NODE_HEARTBEAT_PERIOD}"
71+
if [ ! -z "${SE_NODE_SESSION_TIMEOUT}" ]; then
72+
append_se_opts "--session-timeout" "${SE_NODE_SESSION_TIMEOUT}"
73+
fi
74+
75+
if [ ! -z "${SE_NODE_ENABLE_CDP}" ]; then
76+
append_se_opts "--enable-cdp" "${SE_NODE_ENABLE_CDP}"
77+
fi
78+
79+
if [ ! -z "${SE_NODE_ENABLE_MANAGED_DOWNLOADS}" ]; then
80+
append_se_opts "--enable-managed-downloads" "${SE_NODE_ENABLE_MANAGED_DOWNLOADS}"
81+
fi
82+
83+
if [ ! -z "${SE_NODE_CONNECTION_LIMIT_PER_SESSION}" ]; then
84+
append_se_opts "--connection-limit-per-session" "${SE_NODE_CONNECTION_LIMIT_PER_SESSION}"
5485
fi
5586

5687
if [ ! -z "$SE_LOG_LEVEL" ]; then
@@ -178,4 +209,4 @@ java ${SE_JAVA_OPTS} \
178209
--detect-drivers false \
179210
--bind-host ${SE_BIND_HOST} \
180211
--config ${CONFIG_FILE} \
181-
${SE_GRID_URL} ${SE_OPTS}
212+
${SE_OPTS}

StandaloneKubernetes/start-selenium-grid-kubernetes.sh

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,41 +28,60 @@ if [ ! -z "$SE_OPTS" ]; then
2828
echo "Appending Selenium options: ${SE_OPTS}"
2929
fi
3030

31-
if [ ! -z "$SE_NODE_GRID_URL" ]; then
32-
echo "Appending Grid url: ${SE_NODE_GRID_URL}"
33-
SE_GRID_URL="--grid-url ${SE_NODE_GRID_URL}"
34-
fi
35-
36-
if [ ! -z "$SE_DISABLE_UI" ]; then
31+
if [ ! -z "${SE_DISABLE_UI}" ]; then
3732
append_se_opts "--disable-ui" "${SE_DISABLE_UI}"
3833
fi
3934

40-
if [ ! -z "$SE_ROUTER_USERNAME" ]; then
35+
if [ ! -z "${SE_ROUTER_USERNAME}" ]; then
4136
append_se_opts "--username" "${SE_ROUTER_USERNAME}"
4237
fi
4338

44-
if [ ! -z "$SE_ROUTER_PASSWORD" ]; then
39+
if [ ! -z "${SE_ROUTER_PASSWORD}" ]; then
4540
append_se_opts "--password" "${SE_ROUTER_PASSWORD}" "false"
4641
fi
4742

48-
if [ ! -z "$SE_NODE_ENABLE_MANAGED_DOWNLOADS" ]; then
49-
append_se_opts "--enable-managed-downloads" "${SE_NODE_ENABLE_MANAGED_DOWNLOADS}"
43+
# Specific environment variables name for Node Dynamic only, it will not effect browser container when pass through
44+
45+
if [ ! -z "${SE_DYNAMIC_MAX_SESSIONS}" ]; then
46+
append_se_opts "--max-sessions" "${SE_DYNAMIC_MAX_SESSIONS}"
5047
fi
5148

52-
if [ ! -z "$SE_NODE_ENABLE_CDP" ]; then
53-
append_se_opts "--enable-cdp" "${SE_NODE_ENABLE_CDP}"
49+
if [ ! -z "${SE_DYNAMIC_OVERRIDE_MAX_SESSIONS}" ]; then
50+
append_se_opts "--override-max-sessions" "${SE_DYNAMIC_OVERRIDE_MAX_SESSIONS}"
51+
fi
52+
53+
# Environment variables will be passed through to browser container
54+
55+
if [ ! -z "${SE_NODE_GRID_URL}" ]; then
56+
append_se_opts "--grid-url" "${SE_NODE_GRID_URL}"
57+
fi
58+
59+
if [ ! -z "${SE_NODE_HEARTBEAT_PERIOD}" ]; then
60+
append_se_opts "--heartbeat-period" "${SE_NODE_HEARTBEAT_PERIOD}"
5461
fi
5562

56-
if [ ! -z "$SE_NODE_REGISTER_PERIOD" ]; then
63+
if [ ! -z "${SE_NODE_REGISTER_PERIOD}" ]; then
5764
append_se_opts "--register-period" "${SE_NODE_REGISTER_PERIOD}"
5865
fi
5966

60-
if [ ! -z "$SE_NODE_REGISTER_CYCLE" ]; then
67+
if [ ! -z "${SE_NODE_REGISTER_CYCLE}" ]; then
6168
append_se_opts "--register-cycle" "${SE_NODE_REGISTER_CYCLE}"
6269
fi
6370

64-
if [ ! -z "$SE_NODE_HEARTBEAT_PERIOD" ]; then
65-
append_se_opts "--heartbeat-period" "${SE_NODE_HEARTBEAT_PERIOD}"
71+
if [ ! -z "${SE_NODE_SESSION_TIMEOUT}" ]; then
72+
append_se_opts "--session-timeout" "${SE_NODE_SESSION_TIMEOUT}"
73+
fi
74+
75+
if [ ! -z "${SE_NODE_ENABLE_CDP}" ]; then
76+
append_se_opts "--enable-cdp" "${SE_NODE_ENABLE_CDP}"
77+
fi
78+
79+
if [ ! -z "${SE_NODE_ENABLE_MANAGED_DOWNLOADS}" ]; then
80+
append_se_opts "--enable-managed-downloads" "${SE_NODE_ENABLE_MANAGED_DOWNLOADS}"
81+
fi
82+
83+
if [ ! -z "${SE_NODE_CONNECTION_LIMIT_PER_SESSION}" ]; then
84+
append_se_opts "--connection-limit-per-session" "${SE_NODE_CONNECTION_LIMIT_PER_SESSION}"
6685
fi
6786

6887
if [ ! -z "$SE_LOG_LEVEL" ]; then

Video/video.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ else
3333
NODE_STATUS_ENDPOINT="${SE_SERVER_PROTOCOL}://${DISPLAY_CONTAINER_NAME}:${SE_NODE_PORT}/status"
3434
fi
3535

36+
auth_header=()
3637
if [ -n "${SE_ROUTER_USERNAME}" ] && [ -n "${SE_ROUTER_PASSWORD}" ]; then
3738
BASIC_AUTH="$(echo -en "${SE_ROUTER_USERNAME}:${SE_ROUTER_PASSWORD}" | base64 -w0)"
38-
BASIC_AUTH="Authorization: Basic ${BASIC_AUTH}"
39+
auth_header=(-H "Authorization: Basic ${BASIC_AUTH}")
3940
fi
4041

4142
# Set headers if Node Registration Secret is set
@@ -89,7 +90,7 @@ function wait_for_display() {
8990
}
9091

9192
function check_if_api_respond() {
92-
endpoint_checks=$(curl --noproxy "*" -H "${BASIC_AUTH}" -sk -o /dev/null -w "%{http_code}" "${NODE_STATUS_ENDPOINT}")
93+
endpoint_checks=$(curl --noproxy "*" "${auth_header[@]}" -sk -o /dev/null -w "%{http_code}" "${NODE_STATUS_ENDPOINT}")
9394
if [[ "${endpoint_checks}" != "200" ]]; then
9495
python3 /opt/bin/validate_endpoint.py "${NODE_STATUS_ENDPOINT}"
9596
return 1
@@ -252,7 +253,7 @@ else
252253
recorded_count=0
253254

254255
wait_for_api_respond
255-
while curl --noproxy "*" -H "${BASIC_AUTH}" -sk --request GET ${NODE_STATUS_ENDPOINT} >"/tmp/status.json"; do
256+
while curl --noproxy "*" "${auth_header[@]}" -sk --request GET ${NODE_STATUS_ENDPOINT} >"/tmp/status.json"; do
256257
session_id="$(jq -r "${JQ_SESSION_ID_QUERY}" "/tmp/status.json")"
257258
if [[ "$session_id" != "null" && "$session_id" != "" && "$session_id" != "reserved" && "$recording_started" = "false" ]]; then
258259
echo "$(date -u +"${ts_format}") [${process_name}] - Session: $session_id is created"

0 commit comments

Comments
 (0)