Skip to content

Commit f928f6f

Browse files
committed
K8s: Fix deployment config error in video-manager
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent b2cede1 commit f928f6f

20 files changed

+237
-20
lines changed

.github/workflows/helm-chart-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
docker-version: '26.1.4'
6666
python-version: '3.9'
6767
test-upgrade: true
68-
service-mesh: true
68+
service-mesh: false
6969
os: ubuntu-22.04
7070
check-records-output: true
7171
test-strategy: job
@@ -115,7 +115,7 @@ jobs:
115115
docker-version: '26.1.4'
116116
python-version: '3.10'
117117
test-upgrade: true
118-
service-mesh: true
118+
service-mesh: false
119119
os: ubuntu-22.04
120120
check-records-output: true
121121
test-strategy: playwright_connect_grid
@@ -126,7 +126,7 @@ jobs:
126126
python-version: '3.10'
127127
test-upgrade: true
128128
service-mesh: true
129-
os: blacksmith-8vcpu-ubuntu-2204
129+
os: ubuntu-22.04
130130
check-records-output: false
131131
test-strategy: job_relay
132132
env:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BASE_RELEASE := $(or $(BASE_RELEASE),$(BASE_RELEASE),selenium-4.32.0)
55
BASE_VERSION := $(or $(BASE_VERSION),$(BASE_VERSION),4.32.0)
66
BINDING_VERSION := $(or $(BINDING_VERSION),$(BINDING_VERSION),4.32.0)
77
BASE_RELEASE_NIGHTLY := $(or $(BASE_RELEASE_NIGHTLY),$(BASE_RELEASE_NIGHTLY),nightly)
8-
BASE_VERSION_NIGHTLY := $(or $(BASE_VERSION_NIGHTLY),$(BASE_VERSIO3_NIGHTLY),4.33.0-SNAPSHOT)
8+
BASE_VERSION_NIGHTLY := $(or $(BASE_VERSION_NIGHTLY),$(BASE_VERSION_NIGHTLY),4.33.0-SNAPSHOT)
99
VERSION := $(or $(VERSION),$(VERSION),4.32.0)
1010
MVN_SELENIUM_VERSION := $(or $(MVN_SELENIUM_VERSION),$(MVN_SELENIUM_VERSION),4.32.0)
1111
TAG_VERSION := $(VERSION)-$(BUILD_DATE)

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,43 @@ When using in Dynamic Grid, those variables should be combined with the prefix `
707707
| `SE_UPLOAD_CONFIG_FILE_NAME` | `upload.conf` | Config file for remote host instead of set via env variable prefix SE_RCLONE_* |
708708
| `SE_UPLOAD_CONFIG_DIRECTORY` | `/opt/bin` | Directory of config file (change it when conf file in another directory is mounted) |
709709

710+
## Video recordings manager
711+
712+
We utilize [File Browser](https://filebrowser.org/) as a video manager. It is a web-based file manager that allows you to manage files and folders in the storage.
713+
714+
The File Browser container dir `/srv` should be mounted to the same storage as video recordings stored. For example a compose file:
715+
716+
```yaml
717+
services:
718+
chrome:
719+
deploy:
720+
mode: replicated
721+
replicas: 3
722+
image: selenium/node-chrome:4.32.0-20250505
723+
platform: linux/amd64
724+
shm_size: 2gb
725+
depends_on:
726+
- selenium-hub
727+
volumes:
728+
- /tmp/videos:/videos
729+
environment:
730+
- SE_EVENT_BUS_HOST=selenium-hub
731+
- SE_RECORD_VIDEO=true
732+
- SE_VIDEO_FILE_NAME=auto
733+
- SE_NODE_GRID_URL=http://selenium-hub:4444
734+
735+
file_browser:
736+
image: filebrowser/filebrowser:latest
737+
container_name: file_browser
738+
restart: always
739+
ports:
740+
- "8081:80"
741+
volumes:
742+
- /tmp/videos:/srv
743+
environment:
744+
- FB_NOAUTH=true
745+
```
746+
710747
___
711748

712749
## Dynamic Grid
@@ -1010,6 +1047,8 @@ Get started to deploy Selenium Grid on Kubernetes, you can refer to YAML files i
10101047
To simplify the deployment process, hide the complexity of Kubernetes objects, and provide a more straightforward way to deploy Selenium Grid on Kubernetes, we offer a Helm chart to deploy Selenium Grid to Kubernetes.
10111048
Read more details at the Helm [chart README](./charts/selenium-grid/README.md) and [chart CONFIGURATION](./charts/selenium-grid/CONFIGURATION.md).
10121049

1050+
- Get started to hands-on with Selenium Grid on Kubernetes. See local env setup with [Docker Desktop](./tests/charts/refValues/README.md).
1051+
10131052
___
10141053

10151054
## Configuring the containers

charts/selenium-grid/.helmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@
2323
.vscode/
2424
ci/
2525
certs/add-*-helper.sh
26+
CHANGELOG.md
27+
TESTING.md

charts/selenium-grid/CONFIGURATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
689689
| videoManager.imageTag | string | `"latest"` | File browser image tag (this overwrites global.seleniumGrid.imageTag parameter) |
690690
| videoManager.imagePullPolicy | string | `"IfNotPresent"` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) |
691691
| videoManager.imagePullSecret | string | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) |
692-
| videoManager.config.baseurl | string | `"recordings"` | Base URL use to access the file browser (e.g. http://public.ip/recordings) |
692+
| videoManager.config.baseurl | string | `"/recordings"` | Base URL use to access the file browser (in case expose both Grid and file browser via ingress, e.g. Grid at http://public.ip/selenium and FB at http://public.ip/recordings) |
693693
| videoManager.config.username | string | `""` | Username for the first user when using quick config (default "admin") |
694694
| videoManager.config.password | string | `""` | Hashed password (bcrypt) for the first user when using quick config (default "admin") |
695695
| videoManager.config.noauth | bool | `true` | Use the noauth auther when using quick setup |

charts/selenium-grid/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ This chart enables the creation of a Selenium Grid Server in Kubernetes.
3636
* [Configuration of video recorder and video uploader](#configuration-of-video-recorder-and-video-uploader)
3737
* [Video recorder](#video-recorder)
3838
* [Video uploader](#video-uploader)
39+
* [Video manager](#video-manager)
3940
* [Configuration of Secure Communication](#configuration-of-secure-communication)
4041
* [Create TLS Secret](#create-tls-secret)
4142
* [Secure Connection to Selenium Grid components](#secure-connection-to-selenium-grid-components)
@@ -793,6 +794,45 @@ videoRecorder:
793794
imageTag: latest
794795
```
795796

797+
#### Video manager
798+
799+
We utilize [File Browser](https://filebrowser.org/) as a video manager. It is a web-based file manager that allows you to manage files and folders in the storage. The video manager is disabled by default. To enable it, you need to set config key `videoManager.enabled` to `true`.
800+
801+
The service can be exposed via NodePort or Ingress (if enabled global ingress). By default, there is a baseurl is `/recordings`, if enabled svc type NodePort: `http://<node-ip>:30080/recordings`, or ingress `http://<ingress-hostname>/recordings`. You also can change the baseurl to another value via config key `videoManager.config.baseurl`
802+
803+
804+
The File Browser container dir `/srv` should be mounted to the same storage as video recordings stored. The storage here is persistent volume claim (PVC) that is created by you or dynamically provisioned by the storage class. Configure recorder and manager to use the same PVC. For example
805+
806+
```yaml
807+
videoRecorder:
808+
enabled: true
809+
extraVolumeMounts:
810+
- name: videos
811+
mountPath: /videos
812+
subPath: videos
813+
extraVolumes:
814+
- name: videos
815+
persistentVolumeClaim:
816+
claimName: local-pv-storage
817+
818+
videoManager:
819+
enabled: true
820+
extraVolumeMounts:
821+
- name: videos
822+
mountPath: /srv
823+
subPath: videos
824+
extraVolumes:
825+
- name: videos
826+
persistentVolumeClaim:
827+
claimName: local-pv-storage
828+
```
829+
830+
When configuration is done, via File Browser you can centralize all the recordings in one place. You can manage the recordings, delete them, or download them.
831+
832+
![img_1.png](./images/video-manager_1.png)
833+
834+
![img_2.png](./images/video-manager_2.png)
835+
796836
### Configuration of Secure Communication
797837

798838
Selenium Grid supports secure communication between components. Refer to the [instructions](https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/grid/commands/security.txt) and [options](https://www.selenium.dev/documentation/grid/configuration/cli_options/#server) are able to configure the secure communication. Below is the details on how to enable secure communication in Selenium Grid chart.
60.5 KB
Loading
110 KB
Loading

charts/selenium-grid/templates/chrome-node-scaledjobs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- range $i, $newNode := .Values.crossBrowsers.chromeNode }}
22
{{- $nodeConfig := merge $newNode $.Values.chromeNode -}}
3-
{{- if and $nodeConfig.enabled (include "seleniumGrid.useKEDA" $) (eq $.Values.autoscaling.scalingType "job") }}
3+
{{- if and $nodeConfig.enabled (eq (include "seleniumGrid.useKEDA" $) "true") (eq $.Values.autoscaling.scalingType "job") }}
44
apiVersion: keda.sh/v1alpha1
55
kind: ScaledJob
66
metadata:

charts/selenium-grid/templates/relay-node-scaledjobs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{- range $i, $newNode := .Values.crossBrowsers.relayNode }}
22
{{- $nodeConfig := merge $newNode $.Values.relayNode -}}
3-
{{- if and $nodeConfig.enabled (include "seleniumGrid.useKEDA" $) (eq $.Values.autoscaling.scalingType "job") }}
3+
{{- if and $nodeConfig.enabled (eq (include "seleniumGrid.useKEDA" $) "true") (eq $.Values.autoscaling.scalingType "job") }}
44
apiVersion: keda.sh/v1alpha1
55
kind: ScaledJob
66
metadata:

0 commit comments

Comments
 (0)