diff --git a/charts/selenium-grid/README.md b/charts/selenium-grid/README.md index e40292961a..03de22cefb 100644 --- a/charts/selenium-grid/README.md +++ b/charts/selenium-grid/README.md @@ -274,17 +274,18 @@ ingress-nginx: ### Configuration global For now, global configuration supported is: -| Parameter | Default | Description | -|---------------------------------------|-----------------------|----------------------------------------| -| `global.K8S_PUBLIC_IP` | `""` | Public IP of the host running K8s | -| `global.seleniumGrid.imageRegistry` | `selenium` | Distribution registry to pull images | -| `global.seleniumGrid.imageTag` | `4.18.0-20240220` | Image tag for all selenium components | -| `global.seleniumGrid.nodesImageTag` | `4.18.0-20240220` | Image tag for browser's nodes | -| `global.seleniumGrid.videoImageTag` | `ffmpeg-6.1-20240220` | Image tag for browser's video recorder | -| `global.seleniumGrid.imagePullSecret` | `""` | Pull secret to be used for all images | -| `global.seleniumGrid.imagePullSecret` | `""` | Pull secret to be used for all images | -| `global.seleniumGrid.affinity` | `{}` | Affinity assigned globally | -| `global.seleniumGrid.logLevel` | `INFO` | Set log level for all components | +| Parameter | Default | Description | +|-----------------------------------------------|-----------------------|----------------------------------------| +| `global.K8S_PUBLIC_IP` | `""` | Public IP of the host running K8s | +| `global.seleniumGrid.imageRegistry` | `selenium` | Distribution registry to pull images | +| `global.seleniumGrid.imageTag` | `4.18.0-20240220` | Image tag for all selenium components | +| `global.seleniumGrid.nodesImageTag` | `4.18.0-20240220` | Image tag for browser's nodes | +| `global.seleniumGrid.videoImageTag` | `ffmpeg-6.1-20240220` | Image tag for browser's video recorder | +| `global.seleniumGrid.imagePullSecret` | `""` | Pull secret to be used for all images | +| `global.seleniumGrid.imagePullSecret` | `""` | Pull secret to be used for all images | +| `global.seleniumGrid.affinity` | `{}` | Affinity assigned globally | +| `global.seleniumGrid.logLevel` | `INFO` | Set log level for all components | +| `global.seleniumGrid.defaultNodeStartupProbe` | `exec` | Default startup probe method in Nodes | #### Configuration `global.K8S_PUBLIC_IP` diff --git a/charts/selenium-grid/templates/_helpers.tpl b/charts/selenium-grid/templates/_helpers.tpl index e8fdfcf892..ff5363afe8 100644 --- a/charts/selenium-grid/templates/_helpers.tpl +++ b/charts/selenium-grid/templates/_helpers.tpl @@ -262,6 +262,9 @@ template: startupProbe: {{- if (ne (include "seleniumGrid.probe.fromUserDefine" (dict "values" . "root" $)) "{}") }} {{- include "seleniumGrid.probe.fromUserDefine" (dict "values" . "root" $) | nindent 10 }} + {{- else if eq $.Values.global.seleniumGrid.defaultNodeStartupProbe "exec" }} + exec: + command: ["bash", "-c", "{{ $.Values.nodeConfigMap.extraScriptsDirectory }}/nodeProbe.sh >> /proc/1/fd/1"] {{- else }} httpGet: scheme: {{ default (include "seleniumGrid.probe.httpGet.schema" $) .schema }} diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 1e76a2abe6..57473f1b42 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -16,6 +16,9 @@ global: imagePullSecret: "" # Log level for all components. Possible values describe here: https://www.selenium.dev/documentation/grid/configuration/cli_options/#logging logLevel: INFO + # Set default startup probe for all nodes (supplied values: httpGet, exec). If not set, the default is httpGet + # startup probe method `exec.command` is using a script is mounted from `nodeConfigMap.extraScripts.nodeProbe.sh` + defaultNodeStartupProbe: exec tls: enabled: false @@ -651,8 +654,6 @@ chromeNode: # Wait for pod startup startupProbe: enabled: true - exec: - command: ["bash", "-c", "{{ $.Values.nodeConfigMap.extraScriptsDirectory }}/nodeProbe.sh >> /proc/1/fd/1"] path: /status initialDelaySeconds: 0 periodSeconds: 5 @@ -813,8 +814,6 @@ firefoxNode: # Wait for pod startup startupProbe: enabled: true - exec: - command: ["bash", "-c", "{{ $.Values.nodeConfigMap.extraScriptsDirectory }}/nodeProbe.sh >> /proc/1/fd/1"] path: /status initialDelaySeconds: 0 periodSeconds: 5 @@ -973,8 +972,6 @@ edgeNode: # Wait for pod startup startupProbe: enabled: true - exec: - command: ["bash", "-c", "{{ $.Values.nodeConfigMap.extraScriptsDirectory }}/nodeProbe.sh >> /proc/1/fd/1"] path: /status initialDelaySeconds: 0 periodSeconds: 5