Skip to content

Commit a22c199

Browse files
authored
K8s: Instead of probe to restart Distributor, adding event bus heartbeat to prevent steal connection (#2995)
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 4a17896 commit a22c199

File tree

6 files changed

+18
-2
lines changed

6 files changed

+18
-2
lines changed

EventBus/start-selenium-grid-eventbus.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ if [ ! -z "$SE_EXTERNAL_URL" ]; then
5454
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
5555
fi
5656

57+
if [ ! -z "${SE_EVENT_BUS_HEARTBEAT_PERIOD}" ]; then
58+
append_se_opts "--eventbus-heartbeat-period" "${SE_EVENT_BUS_HEARTBEAT_PERIOD}"
59+
fi
60+
5761
if [ "${SE_ENABLE_TLS}" = "true" ]; then
5862
# Configure truststore for the server
5963
if [ ! -z "$SE_JAVA_SSL_TRUST_STORE" ]; then

Hub/start-selenium-grid-hub.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ if [ ! -z "${CONFIG_FILE}" ]; then
133133
append_se_opts "--config" "${CONFIG_FILE}"
134134
fi
135135

136+
if [ ! -z "${SE_EVENT_BUS_HEARTBEAT_PERIOD}" ]; then
137+
append_se_opts "--eventbus-heartbeat-period" "${SE_EVENT_BUS_HEARTBEAT_PERIOD}"
138+
fi
139+
136140
EXTRA_LIBS=""
137141
if [ -n "${SE_EXTRA_LIBS}" ]; then
138142
EXTRA_LIBS="--ext ${SE_EXTRA_LIBS}"

Standalone/start-selenium-standalone.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ if [ ! -z "$SE_EXTERNAL_URL" ]; then
9999
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
100100
fi
101101

102+
if [ ! -z "${SE_EVENT_BUS_HEARTBEAT_PERIOD}" ]; then
103+
append_se_opts "--eventbus-heartbeat-period" "${SE_EVENT_BUS_HEARTBEAT_PERIOD}"
104+
fi
105+
102106
if [ "${SE_ENABLE_TLS}" = "true" ]; then
103107
# Configure truststore for the server
104108
if [ ! -z "$SE_JAVA_SSL_TRUST_STORE" ]; then

StandaloneDocker/start-selenium-grid-docker.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ if [ ! -z "$SE_EXTERNAL_URL" ]; then
6969
append_se_opts "--external-url" "${SE_EXTERNAL_URL}"
7070
fi
7171

72+
if [ ! -z "${SE_EVENT_BUS_HEARTBEAT_PERIOD}" ]; then
73+
append_se_opts "--eventbus-heartbeat-period" "${SE_EVENT_BUS_HEARTBEAT_PERIOD}"
74+
fi
75+
7276
if [ "${SE_ENABLE_TLS}" = "true" ]; then
7377
# Configure truststore for the server
7478
if [ ! -z "$SE_JAVA_SSL_TRUST_STORE" ]; then

charts/selenium-grid/CONFIGURATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
4040
| global.seleniumGrid.defaultNodeStartupProbe | string | `"exec"` | Set default startup probe method for all nodes (supplied values: httpGet, exec). If not set, the default is httpGet |
4141
| global.seleniumGrid.defaultNodeReadinessProbe | string | `"exec"` | Set default readiness probe method for all nodes (supplied values: httpGet, exec). If not set, the default is httpGet |
4242
| global.seleniumGrid.defaultNodeLivenessProbe | string | `"exec"` | Set default readiness probe method for all nodes (supplied values: httpGet, exec). If not set, the default is httpGet |
43-
| global.seleniumGrid.defaultComponentLivenessProbe | string | `"exec"` | Set default liveness probe method for all nodes (supplied values: httpGet, exec). If not set, the default is httpGet |
43+
| global.seleniumGrid.defaultComponentLivenessProbe | string | `"httpGet"` | Set default liveness probe method for all nodes (supplied values: httpGet, exec). If not set, the default is httpGet |
4444
| global.seleniumGrid.stdoutProbeLog | bool | `false` | Probe logs output can be retrieved using `kubectl logs`. Noted: this will not work if shareProcessNamespace is enabled |
4545
| global.seleniumGrid.revisionHistoryLimit | int | `10` | Specify how many old ReplicaSets for this Deployment you want to retain. The rest will be garbage-collected in the background. |
4646
| global.seleniumGrid.structuredLogs | bool | `false` | Whether to enable structured logging |

charts/selenium-grid/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ global:
2525
# -- Set default readiness probe method for all nodes (supplied values: httpGet, exec). If not set, the default is httpGet
2626
defaultNodeLivenessProbe: exec
2727
# -- Set default liveness probe method for all nodes (supplied values: httpGet, exec). If not set, the default is httpGet
28-
defaultComponentLivenessProbe: exec
28+
defaultComponentLivenessProbe: httpGet
2929
# -- Probe logs output can be retrieved using `kubectl logs`. Noted: this will not work if shareProcessNamespace is enabled
3030
stdoutProbeLog: false
3131
# -- Specify how many old ReplicaSets for this Deployment you want to retain. The rest will be garbage-collected in the background.

0 commit comments

Comments
 (0)