diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 88d78879e..3018d5991 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -55,6 +55,6 @@ body: attributes: label: Docker Selenium version (tag) description: What version of Docker Selenium are you using? - placeholder: 4.12.1-20230920? Please use the full tag, avoid "latest" + placeholder: 4.15.0-20231110? Please use the full tag, avoid "latest" validations: required: true \ No newline at end of file diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index faef306c6..954ed42f9 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -21,7 +21,7 @@ jobs: - name: Output Docker info run: docker info - name: Set up Python 3.8 - uses: actions/setup-python@v4.7.0 + uses: actions/setup-python@v4.7.1 with: python-version: 3.8 - name: Get branch name (only for push to branch) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6ea166dbe..2ba5222d4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -51,25 +51,25 @@ jobs: DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}} DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} - name: Deploy new images - uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2 + uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2 with: timeout_minutes: 20 max_attempts: 3 command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make release - name: Tag images as latest - uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2 + uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2 with: timeout_minutes: 20 max_attempts: 3 command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make tag_latest - name: Deploy latest tag - uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2 + uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2 with: timeout_minutes: 20 max_attempts: 3 command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make release_latest - name: Tag browser images - uses: nick-invision/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # v2 + uses: nick-invision/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2 with: timeout_minutes: 20 max_attempts: 3 @@ -80,7 +80,7 @@ jobs: git config --local user.name "Selenium CI Bot" git commit -m "Update tag in docs and files [skip ci]" -a - name: Push changes - uses: ad-m/github-push-action@40bf560936a8022e68a3c00e7d2abefaf01305a6 # master + uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # master with: github_token: ${{ secrets.SELENIUM_CI_TOKEN }} branch: trunk diff --git a/.github/workflows/helm-chart-release.yml b/.github/workflows/helm-chart-release.yml index 6a5722f3e..e31046aba 100644 --- a/.github/workflows/helm-chart-release.yml +++ b/.github/workflows/helm-chart-release.yml @@ -23,6 +23,6 @@ jobs: git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.5.0 + uses: helm/chart-releaser-action@v1.6.0 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/helm-chart-test.yml b/.github/workflows/helm-chart-test.yml new file mode 100644 index 000000000..cf8f8c439 --- /dev/null +++ b/.github/workflows/helm-chart-test.yml @@ -0,0 +1,50 @@ +name: Lint and Test Helm Charts + +on: + push: + paths: + - 'charts/selenium-grid/**' + pull_request: + paths: + - 'charts/selenium-grid/**' + workflow_dispatch: + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v3 + with: + version: v3.13.2 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + check-latest: true + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.6.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --config tests/chart-test.yaml) + if [[ -n "$changed" ]]; then + echo "{changed}={true}" >> $GITHUB_OUTPUT + fi + + - name: Run chart-testing (lint) + run: ct lint --config tests/chart-test.yaml + + - name: Create kind cluster + uses: helm/kind-action@v1.8.0 + + - name: Run chart-testing (install) + run: ct install --all --config tests/chart-test.yaml diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 599e1c54f..493bb0dea 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -14,7 +14,7 @@ jobs: action: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21 # v3 + - uses: dessant/lock-threads@d42e5f49803f3c4e14ffee0378e31481265dda22 # v3 with: process-only: 'issues' issue-lock-inactive-days: '30' diff --git a/.github/workflows/test-video.yml b/.github/workflows/test-video.yml index b5de436e2..3e7c34498 100644 --- a/.github/workflows/test-video.yml +++ b/.github/workflows/test-video.yml @@ -18,7 +18,7 @@ jobs: - name: Output Docker info run: docker info - name: Set up Python 3.8 - uses: actions/setup-python@v4.7.0 + uses: actions/setup-python@v4.7.1 with: python-version: 3.8 - name: Get branch name (only for push to branch) diff --git a/.gitignore b/.gitignore index 7377b135b..fc44914b7 100644 --- a/.gitignore +++ b/.gitignore @@ -147,4 +147,5 @@ ENV/ # End of https://www.gitignore.io/api/python .DS_Store - +/charts/*/charts +/charts/*/**.lock diff --git a/Base/Dockerfile b/Base/Dockerfile index d8a0f1808..f74aa81c7 100644 --- a/Base/Dockerfile +++ b/Base/Dockerfile @@ -1,4 +1,4 @@ -# FROM ubuntu:focal-20210416 +#FROM ubuntu:focal-20210416 #FROM ubuntu:focal-20210827 #FROM ubuntu:focal-20211006 #FROM ubuntu:focal-20220302 @@ -42,7 +42,7 @@ RUN apt-get -qqy update \ curl \ supervisor \ gnupg2 \ - && rm -rf /var/lib/apt/lists/* /var/cache/apt/* + && rm -rf /var/lib/apt/lists/* /var/cache/apt/* #=================== @@ -93,10 +93,8 @@ COPY supervisord.conf /etc RUN mkdir -p /opt/selenium /opt/selenium/assets /var/run/supervisor /var/log/supervisor \ && touch /opt/selenium/config.toml \ && chmod -R 777 /opt/selenium /opt/selenium/assets /var/run/supervisor /var/log/supervisor /etc/passwd \ - && wget --no-verbose https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.10.0/selenium-server-4.10.0.jar \ + && wget --no-verbose https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.15.0/selenium-server-4.15.0.jar \ -O /opt/selenium/selenium-server.jar \ - && wget --no-verbose https://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-http-jdk-client/4.10.0/selenium-http-jdk-client-4.10.0.jar \ - -O /opt/selenium/selenium-http-jdk-client.jar \ && chgrp -R 0 /opt/selenium ${HOME} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \ && chmod -R g=u /opt/selenium ${HOME} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \ && setfacl -Rm u:seluser:rwx /opt /opt/selenium ${HOME} /opt/selenium/assets /var/run/supervisor /var/log/supervisor @@ -115,7 +113,7 @@ RUN if [ `arch` = "aarch64" ]; then \ fi RUN if [ -f "/tmp/cs" ]; then \ - /tmp/cs fetch --classpath --cache /external_jars io.opentelemetry:opentelemetry-exporter-otlp:1.28.0 io.opentelemetry:opentelemetry-exporter-jaeger:1.28.0 io.grpc:grpc-netty:1.57.1 > /external_jars/.classpath.txt ; \ + /tmp/cs fetch --classpath --cache /external_jars io.opentelemetry:opentelemetry-exporter-otlp:1.31.0 io.opentelemetry:opentelemetry-exporter-jaeger:1.31.0 io.grpc:grpc-netty:1.59.0 > /external_jars/.classpath.txt ; \ fi RUN if [ -f "/tmp/cs" ]; then chmod 664 /external_jars/.classpath.txt ; fi diff --git a/Makefile b/Makefile index fba9eae9f..9a4a86189 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ BUILD_ARGS := $(BUILD_ARGS) MAJOR := $(word 1,$(subst ., ,$(TAG_VERSION))) MINOR := $(word 2,$(subst ., ,$(TAG_VERSION))) MAJOR_MINOR_PATCH := $(word 1,$(subst -, ,$(TAG_VERSION))) -FFMPEG_TAG_VERSION := $(or $(FFMPEG_TAG_VERSION),$(FFMPEG_TAG_VERSION),ffmpeg-4.3.1) +FFMPEG_TAG_VERSION := $(or $(FFMPEG_TAG_VERSION),$(FFMPEG_TAG_VERSION),ffmpeg-6.0) PLATFORMS := $(or $(PLATFORMS),$(PLATFORMS),linux/arm64) all: hub \ @@ -498,9 +498,9 @@ test_video: video hub chrome firefox edge done # Using ffmpeg to verify file integrity # https://superuser.com/questions/100288/how-can-i-check-the-integrity-of-a-video-file-avi-mpeg-mp4 - docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:4.3.1-ubuntu2004 -v error -i ./tests/videos/chrome_video.mp4 -f null - 2>error.log - docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:4.3.1-ubuntu2004 -v error -i ./tests/videos/firefox_video.mp4 -f null - 2>error.log - docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:4.3.1-ubuntu2004 -v error -i ./tests/videos/edge_video.mp4 -f null - 2>error.log + docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:6.0-alpine -v error -i ./tests/videos/chrome_video.mp4 -f null - 2>error.log + docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:6.0-alpine -v error -i ./tests/videos/firefox_video.mp4 -f null - 2>error.log + docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:6.0-alpine -v error -i ./tests/videos/edge_video.mp4 -f null - 2>error.log .PHONY: \ all \ diff --git a/NodeBase/Dockerfile b/NodeBase/Dockerfile index dda04b9c8..2e596767f 100644 --- a/NodeBase/Dockerfile +++ b/NodeBase/Dockerfile @@ -139,9 +139,9 @@ RUN mkdir -p ${HOME}/.vnc \ && x11vnc -storepasswd secret ${HOME}/.vnc/passwd # Added to avoid the following sudo error while running multi-arch builds: -# "sudo: effective uid is not 0, is /usr/bin/sudo on a file system with +# "sudo: effective uid is not 0, is /usr/bin/sudo on a file system with # the 'nosuid' option set or an NFS file system without root privileges?" -USER root +USER root #========== # Relaxing permissions for OpenShift and other non-sudo environments @@ -179,7 +179,7 @@ ENV DISPLAY_NUM 99 # Path to the Configfile ENV CONFIG_FILE=/opt/selenium/config.toml ENV GENERATE_CONFIG true -# Drain the Node after N sessions. +# Drain the Node after N sessions. # A value higher than zero enables the feature ENV SE_DRAIN_AFTER_SESSION_COUNT 0 # Setting Selenium Manager to work offline diff --git a/NodeBase/start-xvfb.sh b/NodeBase/start-xvfb.sh index 5e7092a51..b4959a390 100755 --- a/NodeBase/start-xvfb.sh +++ b/NodeBase/start-xvfb.sh @@ -19,5 +19,5 @@ if [ "${START_XVFB:-$SE_START_XVFB}" = true ] ; then --server-args="-screen 0 ${GEOMETRY} -fbdir /var/tmp -dpi ${SCREEN_DPI} -listen tcp -noreset -ac +extension RANDR" \ /usr/bin/fluxbox -display ${DISPLAY} else - echo "Xvfb and Fluxbox won't start. Chrome/Firefox/Node can only run in headless mode. Remember to set the 'headless' flag in your test." + echo "Xvfb and Fluxbox won't start. Chrome/Firefox/Edge can only run in headless mode. Remember to set the 'headless' flag in your test." fi diff --git a/NodeDocker/config.toml b/NodeDocker/config.toml index e15b1e5e6..99a73aa16 100644 --- a/NodeDocker/config.toml +++ b/NodeDocker/config.toml @@ -2,9 +2,9 @@ # Configs have a mapping between the Docker image to use and the capabilities that need to be matched to # start a container with the given image. configs = [ - "selenium/standalone-firefox:4.12.1-20230920", '{"browserName": "firefox", "platformName": "linux"}', - "selenium/standalone-chrome:4.12.1-20230920", '{"browserName": "chrome", "platformName": "linux"}', - "selenium/standalone-edge:4.12.1-20230920", '{"browserName": "MicrosoftEdge", "platformName": "linux"}' + "selenium/standalone-firefox:4.15.0-20231110", '{"browserName": "firefox", "platformName": "linux"}', + "selenium/standalone-chrome:4.15.0-20231110", '{"browserName": "chrome", "platformName": "linux"}', + "selenium/standalone-edge:4.15.0-20231110", '{"browserName": "MicrosoftEdge", "platformName": "linux"}' ] # URL for connecting to the docker daemon @@ -14,7 +14,7 @@ configs = [ # socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock url = "http://127.0.0.1:2375" # Docker image used for video recording -video-image = "selenium/video:ffmpeg-4.3.1-20230920" +video-image = "selenium/video:ffmpeg-6.0-20231110" # Uncomment the following section if you are running the node on a separate VM # Fill out the placeholders with appropriate values diff --git a/NodeFirefox/Dockerfile b/NodeFirefox/Dockerfile index 0590f1678..698fe6338 100644 --- a/NodeFirefox/Dockerfile +++ b/NodeFirefox/Dockerfile @@ -13,6 +13,7 @@ ARG FIREFOX_VERSION=latest RUN FIREFOX_DOWNLOAD_URL=$(if [ $FIREFOX_VERSION = "latest" ] || [ $FIREFOX_VERSION = "beta-latest" ] || [ $FIREFOX_VERSION = "nightly-latest" ] || [ $FIREFOX_VERSION = "devedition-latest" ] || [ $FIREFOX_VERSION = "esr-latest" ]; then echo "https://download.mozilla.org/?product=firefox-$FIREFOX_VERSION-ssl&os=linux64&lang=en-US"; else echo "https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2"; fi) \ && apt-get update -qqy \ && apt-get -qqy --no-install-recommends install firefox libavcodec-extra \ + libgtk-3-dev libdbus-glib-1-dev \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ && wget --no-verbose -O /tmp/firefox.tar.bz2 $FIREFOX_DOWNLOAD_URL \ && apt-get -y purge firefox \ diff --git a/NodeFirefox/Dockerfile.multi-arch b/NodeFirefox/Dockerfile.multi-arch index ec549e640..99e828fa3 100644 --- a/NodeFirefox/Dockerfile.multi-arch +++ b/NodeFirefox/Dockerfile.multi-arch @@ -24,7 +24,7 @@ USER root RUN echo "deb http://deb.debian.org/debian/ sid main" >> /etc/apt/sources.list \ && apt-get update -qqy \ && apt-get install libavcodec-extra -y \ - && wget https://snapshot.debian.org/archive/debian/20230924T210045Z/pool/main/f/firefox/firefox_117.0.1-1_`dpkg --print-architecture`.deb -O firefox.deb \ + && wget https://snapshot.debian.org/archive/debian/20231117T085632Z/pool/main/f/firefox/firefox_119.0.1-1_`dpkg --print-architecture`.deb -O firefox.deb \ && apt install ./firefox.deb -y \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/* ./firefox.deb @@ -40,7 +40,7 @@ RUN if [ $TARGETARCH = "arm" ] && [ $TARGETVARIANT = "v7" ]; then \ echo "*** BUILD ERROR: \$TARGETARCH must be arm64, amd64, or arm with \$TARGETVARIANT set to v7... exiting..." ; \ exit 1 ; \ fi ; \ - if [ "$ARCH" = "arm64" ]; then \ + if [ "$ARCH" = "arm64" ]; then \ wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux-aarch64.tar.gz ; \ elif [ "$ARCH" = "armhf" ]; then \ wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/jamesmortensen/geckodriver-arm-binaries/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux-armv7l.tar.gz ; \ diff --git a/README.md b/README.md index 12a4d86ed..156f9aa4c 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ The project is made possible by volunteer contributors who have put in thousands and made the source code freely available under the [Apache License 2.0](LICENSE.md). These Docker images come with a handful of tags to simplify its usage, have a look at them in one of -our [releases](https://github.com/SeleniumHQ/docker-selenium/releases/tag/4.12.1-20230920). +our [releases](https://github.com/SeleniumHQ/docker-selenium/releases/tag/4.15.0-20231110). To get notifications of new releases, add yourself as a "Releases only" watcher. @@ -153,7 +153,7 @@ Talk to us at https://www.selenium.dev/support/ 1. Start a Docker container with Firefox ```bash -docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-firefox:4.12.1-20230920 +docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-firefox:4.15.0-20231110 ``` 2. Point your WebDriver tests to http://localhost:4444 @@ -340,17 +340,17 @@ For more information on the Dev and Beta channel container images, see the blog ![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_24x24.png) Firefox ```bash -docker run -d -p 4444:4444 --shm-size="2g" selenium/standalone-firefox:4.12.1-20230920 +docker run -d -p 4444:4444 --shm-size="2g" selenium/standalone-firefox:4.15.0-20231110 ``` ![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_24x24.png) Chrome ```bash -docker run -d -p 4444:4444 --shm-size="2g" selenium/standalone-chrome:4.12.1-20230920 +docker run -d -p 4444:4444 --shm-size="2g" selenium/standalone-chrome:4.15.0-20231110 ``` ![Edge](https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_24x24.png) Edge ```bash -docker run -d -p 4444:4444 --shm-size="2g" selenium/standalone-edge:4.12.1-20230920 +docker run -d -p 4444:4444 --shm-size="2g" selenium/standalone-edge:4.15.0-20231110 ``` _Note: Only one Standalone container can run on port_ `4444` _at the same time._ @@ -369,44 +369,44 @@ A Docker [network](https://docs.docker.com/engine/reference/commandline/network_ ```bash $ docker network create grid -$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.12.1-20230920 +$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \ --shm-size="2g" \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ - selenium/node-chrome:4.12.1-20230920 + selenium/node-chrome:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \ --shm-size="2g" \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ - selenium/node-edge:4.12.1-20230920 + selenium/node-edge:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \ --shm-size="2g" \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ - selenium/node-firefox:4.12.1-20230920 + selenium/node-firefox:4.15.0-20231110 ``` ##### Windows PowerShell ```powershell $ docker network create grid -$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.12.1-20230920 +$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub ` --shm-size="2g" ` -e SE_EVENT_BUS_PUBLISH_PORT=4442 ` -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 ` - selenium/node-chrome:4.12.1-20230920 + selenium/node-chrome:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub ` --shm-size="2g" ` -e SE_EVENT_BUS_PUBLISH_PORT=4442 ` -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 ` - selenium/node-edge:4.12.1-20230920 + selenium/node-edge:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub ` --shm-size="2g" ` -e SE_EVENT_BUS_PUBLISH_PORT=4442 ` -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 ` - selenium/node-firefox:4.12.1-20230920 + selenium/node-firefox:4.15.0-20231110 ``` When you are done using the Grid, and the containers have exited, the network can be removed with the following command: @@ -423,7 +423,7 @@ configured to expose different ports. ##### Hub - Machine/VM 1 ```bash -$ docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium/hub:4.12.1-20230920 +$ docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium/hub:4.15.0-20231110 ``` ##### Node Chrome - Machine/VM 2 @@ -437,7 +437,7 @@ $ docker run -d -p 5555:5555 \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ -e SE_NODE_HOST= \ - selenium/node-chrome:4.12.1-20230920 + selenium/node-chrome:4.15.0-20231110 ``` ###### Windows PowerShell @@ -449,7 +449,7 @@ $ docker run -d -p 5555:5555 ` -e SE_EVENT_BUS_PUBLISH_PORT=4442 ` -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 ` -e SE_NODE_HOST= ` - selenium/node-chrome:4.12.1-20230920 + selenium/node-chrome:4.15.0-20231110 ``` @@ -464,7 +464,7 @@ $ docker run -d -p 5555:5555 \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ -e SE_NODE_HOST= \ - selenium/node-edge:4.12.1-20230920 + selenium/node-edge:4.15.0-20231110 ``` ###### Windows PowerShell @@ -476,7 +476,7 @@ $ docker run -d -p 5555:5555 ` -e SE_EVENT_BUS_PUBLISH_PORT=4442 ` -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 ` -e SE_NODE_HOST= ` - selenium/node-edge:4.12.1-20230920 + selenium/node-edge:4.15.0-20231110 ``` ##### Node Firefox - Machine/VM 4 @@ -490,7 +490,7 @@ $ docker run -d -p 5555:5555 \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ -e SE_NODE_HOST= \ - selenium/node-firefox:4.12.1-20230920 + selenium/node-firefox:4.15.0-20231110 ``` ###### Windows PowerShell @@ -502,7 +502,7 @@ $ docker run -d -p 5555:5555 ` -e SE_EVENT_BUS_PUBLISH_PORT=4442 ` -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 ` -e SE_NODE_HOST= ` - selenium/node-firefox:4.12.1-20230920 + selenium/node-firefox:4.15.0-20231110 ``` ##### Node Chrome - Machine/VM 4 @@ -517,7 +517,7 @@ $ docker run -d -p 5556:5556 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ -e SE_NODE_HOST= \ -e SE_NODE_PORT=5556 \ - selenium/node-chrome:4.12.1-20230920 + selenium/node-chrome:4.15.0-20231110 ``` ###### Windows PowerShell @@ -530,7 +530,7 @@ $ docker run -d -p 5556:5556 ` -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 ` -e SE_NODE_HOST= ` -e SE_NODE_PORT=5556 ` - selenium/node-chrome:4.12.1-20230920 + selenium/node-chrome:4.15.0-20231110 ``` #### Docker Compose @@ -562,7 +562,7 @@ ___ ## Video recording -Tests execution can be recorded by using the `selenium/video:ffmpeg-4.3.1-20230920` +Tests execution can be recorded by using the `selenium/video:ffmpeg-6.0-20231110` Docker image. One container is needed per each container where a browser is running. This means if you are running 5 Nodes/Standalone containers, you will need 5 video containers, the mapping is 1-1. @@ -588,8 +588,8 @@ This example shows how to start the containers manually: ``` bash $ docker network create grid -$ docker run -d -p 4444:4444 -p 6900:5900 --net grid --name selenium --shm-size="2g" selenium/standalone-chrome:4.12.1-20230920 -$ docker run -d --net grid --name video -v /tmp/videos:/videos selenium/video:ffmpeg-4.3.1-20230920 +$ docker run -d -p 4444:4444 -p 6900:5900 --net grid --name selenium --shm-size="2g" selenium/standalone-chrome:4.15.0-20231110 +$ docker run -d --net grid --name video -v /tmp/videos:/videos selenium/video:ffmpeg-6.0-20231110 # Run your tests $ docker stop video && docker rm video $ docker stop selenium && docker rm selenium @@ -621,9 +621,9 @@ You can save this file locally and name it, for example, `config.toml`. # Configs have a mapping between the Docker image to use and the capabilities that need to be matched to # start a container with the given image. configs = [ - "selenium/standalone-firefox:4.12.1-20230920", '{"browserName": "firefox"}', - "selenium/standalone-chrome:4.12.1-20230920", '{"browserName": "chrome"}', - "selenium/standalone-edge:4.12.1-20230920", '{"browserName": "MicrosoftEdge"}' + "selenium/standalone-firefox:4.15.0-20231110", '{"browserName": "firefox"}', + "selenium/standalone-chrome:4.15.0-20231110", '{"browserName": "chrome"}', + "selenium/standalone-edge:4.15.0-20231110", '{"browserName": "MicrosoftEdge"}' ] # URL for connecting to the docker daemon @@ -636,7 +636,7 @@ configs = [ # Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue. url = "http://127.0.0.1:2375" # Docker image used for video recording -video-image = "selenium/video:ffmpeg-4.3.1-20230920" +video-image = "selenium/video:ffmpeg-6.0-20231110" # Uncomment the following section if you are running the node on a separate VM # Fill out the placeholders with appropriate values @@ -655,28 +655,28 @@ virtual machines. ```bash $ docker network create grid -$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.12.1-20230920 +$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ -v ${PWD}/config.toml:/opt/bin/config.toml \ -v ${PWD}/assets:/opt/selenium/assets \ -v /var/run/docker.sock:/var/run/docker.sock \ - selenium/node-docker:4.12.1-20230920 + selenium/node-docker:4.15.0-20231110 ``` #### Windows PowerShell ```powershell $ docker network create grid -$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.12.1-20230920 +$ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub ` -e SE_EVENT_BUS_PUBLISH_PORT=4442 ` -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 ` -v ${PWD}/config.toml:/opt/bin/config.toml ` -v ${PWD}/assets:/opt/selenium/assets ` -v /var/run/docker.sock:/var/run/docker.sock ` - selenium/node-docker:4.12.1-20230920 + selenium/node-docker:4.15.0-20231110 ``` To have the assets saved on your host, please mount your host path to `/opt/selenium/assets`. @@ -697,7 +697,7 @@ docker run --rm --name selenium-docker -p 4444:4444 \ -v ${PWD}/config.toml:/opt/bin/config.toml \ -v ${PWD}/assets:/opt/selenium/assets \ -v /var/run/docker.sock:/var/run/docker.sock \ - selenium/standalone-docker:4.12.1-20230920 + selenium/standalone-docker:4.15.0-20231110 ``` #### Windows PowerShell @@ -707,7 +707,7 @@ docker run --rm --name selenium-docker -p 4444:4444 ` -v ${PWD}/config.toml:/opt/bin/config.toml ` -v ${PWD}/assets:/opt/selenium/assets ` -v /var/run/docker.sock:/var/run/docker.sock ` - selenium/standalone-docker:4.12.1-20230920 + selenium/standalone-docker:4.15.0-20231110 ``` ### Using Dynamic Grid in different machines/VMs @@ -715,7 +715,7 @@ docker run --rm --name selenium-docker -p 4444:4444 ` #### Hub - Machine/VM 1 ```bash -$ docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium/hub:4.12.1-20230920 +$ docker run -d -p 4442-4444:4442-4444 --name selenium-hub selenium/hub:4.15.0-20231110 ``` #### Node Chrome - Machine/VM 2 @@ -730,7 +730,7 @@ $ docker run -d -p 5555:5555 \ -v ${PWD}/config.toml:/opt/bin/config.toml \ -v ${PWD}/assets:/opt/selenium/assets \ -v /var/run/docker.sock:/var/run/docker.sock \ - selenium/node-docker:4.12.1-20230920 + selenium/node-docker:4.15.0-20231110 ``` #### Windows PowerShell @@ -743,7 +743,7 @@ $ docker run -d -p 5555:5555 ` -v ${PWD}/config.toml:/opt/bin/config.toml ` -v ${PWD}/assets:/opt/selenium/assets ` -v /var/run/docker.sock:/var/run/docker.sock ` - selenium/node-docker:4.12.1-20230920 + selenium/node-docker:4.15.0-20231110 ``` Complete the `[server]` section in the `config.toml` file. @@ -752,9 +752,9 @@ Complete the `[server]` section in the `config.toml` file. # Configs have a mapping between the Docker image to use and the capabilities that need to be matched to # start a container with the given image. configs = [ - "selenium/standalone-firefox:4.12.1-20230920", "{\"browserName\": \"firefox\"}", - "selenium/standalone-chrome:4.12.1-20230920", "{\"browserName\": \"chrome\"}", - "selenium/standalone-edge:4.12.1-20230920", "{\"browserName\": \"MicrosoftEdge\"}" + "selenium/standalone-firefox:4.15.0-20231110", "{\"browserName\": \"firefox\"}", + "selenium/standalone-chrome:4.15.0-20231110", "{\"browserName\": \"chrome\"}", + "selenium/standalone-edge:4.15.0-20231110", "{\"browserName\": \"MicrosoftEdge\"}" ] # URL for connecting to the docker daemon @@ -767,7 +767,7 @@ configs = [ # Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue. url = "http://127.0.0.1:2375" # Docker image used for video recording -video-image = "selenium/video:ffmpeg-4.3.1-20230920" +video-image = "selenium/video:ffmpeg-6.0-20231110" # Uncomment the following section if you are running the node on a separate VM # Fill out the placeholders with appropriate values @@ -801,7 +801,7 @@ docker run --rm --name selenium-docker -p 4444:4444 \ -v ${PWD}/config.toml:/opt/bin/config.toml \ -v ${PWD}/assets:/opt/selenium/assets \ -v /var/run/docker.sock:/var/run/docker.sock \ - selenium/standalone-docker:4.12.1-20230920 + selenium/standalone-docker:4.15.0-20231110 ``` #### Windows PowerShell @@ -812,7 +812,7 @@ docker run --rm --name selenium-docker -p 4444:4444 ` -v ${PWD}/config.toml:/opt/bin/config.toml ` -v ${PWD}/assets:/opt/selenium/assets ` -v /var/run/docker.sock:/var/run/docker.sock ` - selenium/standalone-docker:4.12.1-20230920 + selenium/standalone-docker:4.15.0-20231110 ``` @@ -850,7 +850,7 @@ ___ You can pass `SE_OPTS` variable with additional command line parameters for starting a hub or a node. ``` bash -$ docker run -d -p 4444:4444 -e SE_OPTS="--log-level FINE" --name selenium-hub selenium/hub:4.12.1-20230920 +$ docker run -d -p 4444:4444 -e SE_OPTS="--log-level FINE" --name selenium-hub selenium/hub:4.15.0-20231110 ``` ### SE_JAVA_OPTS Java Environment Options @@ -858,7 +858,7 @@ $ docker run -d -p 4444:4444 -e SE_OPTS="--log-level FINE" --name selenium-hub s You can pass `SE_JAVA_OPTS` environment variable to the Java process. ``` bash -$ docker run -d -p 4444:4444 -e SE_JAVA_OPTS=-Xmx512m --name selenium-hub selenium/hub:4.12.1-20230920 +$ docker run -d -p 4444:4444 -e SE_JAVA_OPTS=-Xmx512m --name selenium-hub selenium/hub:4.15.0-20231110 ``` ### Node configuration options @@ -880,7 +880,7 @@ $ docker run -d \ -e SE_EVENT_BUS_HOST= \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 -e SE_NODE_STEREOTYPE="{\"browserName\":\"${SE_NODE_BROWSER_NAME}\",\"browserVersion\":\"${SE_NODE_BROWSER_VERSION}\",\"platformName\": \"Linux\"}" \ - --shm-size="2g" selenium/node-chrome:4.12.1-20230920 + --shm-size="2g" selenium/node-chrome:4.15.0-20231110 ``` ### Setting Sub Path @@ -899,7 +899,7 @@ These settings can be adjusted by specifying `SE_SCREEN_WIDTH`, `SE_SCREEN_HEIGH environmental variables when starting the container. ``` bash -docker run -d -e SE_SCREEN_WIDTH=1366 -e SE_SCREEN_HEIGHT=768 -e SE_SCREEN_DEPTH=24 -e SE_SCREEN_DPI=74 selenium/standalone-firefox:4.12.1-20230920 +docker run -d -e SE_SCREEN_WIDTH=1366 -e SE_SCREEN_HEIGHT=768 -e SE_SCREEN_DEPTH=24 -e SE_SCREEN_DPI=74 selenium/standalone-firefox:4.15.0-20231110 ``` ### Grid Url and Session Timeout @@ -949,7 +949,7 @@ To avoid starting the server you can set the `START_XVFB` environment variable t ``` bash $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ - -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 -e START_XVFB=false --shm-size="2g" selenium/node-chrome:4.12.1-20230920 + -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 -e START_XVFB=false --shm-size="2g" selenium/node-chrome:4.15.0-20231110 ``` For more information, see this GitHub [issue](https://github.com/SeleniumHQ/docker-selenium/issues/567). @@ -962,7 +962,7 @@ pod and then scale a new one after N sessions. Set the environment variable `SE_ a value higher than zero to enable this behaviour. ``` bash -$ docker run -e SE_DRAIN_AFTER_SESSION_COUNT=5 --shm-size="2g" selenium/standalone-firefox:4.12.1-20230920 +$ docker run -e SE_DRAIN_AFTER_SESSION_COUNT=5 --shm-size="2g" selenium/standalone-firefox:4.15.0-20231110 ``` With the previous command, the Standalone container will shut down after 5 sessions have been executed. @@ -1054,22 +1054,22 @@ $ docker network create grid $ docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub \ --health-cmd='/opt/bin/check-grid.sh --host 0.0.0.0 --port 4444' \ --health-interval=15s --health-timeout=30s --health-retries=5 \ - selenium/hub:4.12.1-20230920 + selenium/hub:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \ --shm-size="2g" \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ - selenium/node-chrome:4.12.1-20230920 + selenium/node-chrome:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \ --shm-size="2g" \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ - selenium/node-edge:4.12.1-20230920 + selenium/node-edge:4.15.0-20231110 $ docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \ --shm-size="2g" \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ - selenium/node-firefox:4.12.1-20230920 + selenium/node-firefox:4.15.0-20231110 ``` **Note:** The `\` line delimiter won't work on Windows-based terminals, try either `^` or a backtick. @@ -1202,7 +1202,7 @@ RUN mkdir -p -m755 /seluser/.pki/nssdb \ && chown -R 1200:1201 /seluser # Start from Selenium image and add relevant files from build image -FROM selenium/node-chrome:4.12.1-20230920 +FROM selenium/node-chrome:4.15.0-20231110 USER root COPY --from=build /seluser/ /home/seluser/ USER seluser @@ -1217,7 +1217,7 @@ RUN mkdir -p "/distribution" "/certs" && \ echo '{ "policies": { "Certificates": { "Install": ["/opt/firefox-latest/YOUR_CA.pem"] }} }' >"/distribution/policies.json" # Start from Selenium image and add relevant files from build image -FROM selenium/node-firefox:4.12.1-20230920 +FROM selenium/node-firefox:4.15.0-20231110 USER root COPY --from=build /certs /opt/firefox-latest COPY --from=build /distribution /opt/firefox-latest/distribution @@ -1240,9 +1240,9 @@ You can override it with the `SE_VNC_PORT` environment variable in case you want Here is an example with the standalone images, the same concept applies to the node images. ``` bash -$ docker run -d -p 4444:4444 -p 5900:5900 --shm-size="2g" selenium/standalone-chrome:4.12.1-20230920 -$ docker run -d -p 4445:4444 -p 5901:5900 --shm-size="2g" selenium/standalone-edge:4.12.1-20230920 -$ docker run -d -p 4446:4444 -p 5902:5900 --shm-size="2g" selenium/standalone-firefox:4.12.1-20230920 +$ docker run -d -p 4444:4444 -p 5900:5900 --shm-size="2g" selenium/standalone-chrome:4.15.0-20231110 +$ docker run -d -p 4445:4444 -p 5901:5900 --shm-size="2g" selenium/standalone-edge:4.15.0-20231110 +$ docker run -d -p 4446:4444 -p 5902:5900 --shm-size="2g" selenium/standalone-firefox:4.15.0-20231110 ``` Then, you would use in your VNC client: @@ -1268,9 +1268,9 @@ You can also override it with the `SE_NO_VNC_PORT` environment variable in case Here is an example with the standalone images, the same concept applies to the node images. ``` bash -$ docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:4.12.1-20230920 -$ docker run -d -p 4445:4444 -p 7901:7900 --shm-size="2g" selenium/standalone-edge:4.12.1-20230920 -$ docker run -d -p 4446:4444 -p 7902:7900 --shm-size="2g" selenium/standalone-firefox:4.12.1-20230920 +$ docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome:4.15.0-20231110 +$ docker run -d -p 4445:4444 -p 7901:7900 --shm-size="2g" selenium/standalone-edge:4.15.0-20231110 +$ docker run -d -p 4446:4444 -p 7902:7900 --shm-size="2g" selenium/standalone-firefox:4.15.0-20231110 ``` Then, you would use in your browser: @@ -1295,28 +1295,28 @@ In order to enable tracing in the Selenium Grid container, the following command ```bash docker network create grid docker run -d -p 16686:16686 -p 14250:14250 --net grid --name jaeger jaegertracing/all-in-one:1.17 -docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.12.1-20230920 +docker run -d -p 4442-4444:4442-4444 --net grid --name selenium-hub selenium/hub:4.15.0-20231110 docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \ --shm-size="2g" \ -e SE_ENABLE_TRACING=true \ -e JAVA_OPTS="-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-hub" \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ - selenium/node-chrome:4.12.1-20230920 + selenium/node-chrome:4.15.0-20231110 docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \ --shm-size="2g" \ -e SE_ENABLE_TRACING=true \ -e JAVA_OPTS="-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-node-edge" \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ - selenium/node-edge:4.12.1-20230920 + selenium/node-edge:4.15.0-20231110 docker run -d --net grid -e SE_EVENT_BUS_HOST=selenium-hub \ --shm-size="2g" \ -e SE_ENABLE_TRACING=true \ -e JAVA_OPTS="-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-node-firefox" \ -e SE_EVENT_BUS_PUBLISH_PORT=4442 \ -e SE_EVENT_BUS_SUBSCRIBE_PORT=4443 \ - selenium/node-firefox:4.12.1-20230920 + selenium/node-firefox:4.15.0-20231110 ``` You can also refer to the below docker-compose yaml files to be able to start a simple grid (or) a dynamic grid. @@ -1376,7 +1376,7 @@ container in the following way: ```bash docker run -d -p 4444:4444 --shm-size="2g" \ -v /home/ubuntu/files:/home/seluser/files \ - selenium/standalone-chrome:4.12.1-20230920 + selenium/standalone-chrome:4.15.0-20231110 ``` That will mount the host `/home/ubuntu/files` directory diff --git a/Standalone/generate_config b/Standalone/generate_config index ef763f305..1c0a0b31f 100755 --- a/Standalone/generate_config +++ b/Standalone/generate_config @@ -44,7 +44,12 @@ elif [[ "${SE_NODE_BROWSER_NAME}" == "MicrosoftEdge" ]]; then SE_NODE_BROWSER_VERSION=$(short_version $(microsoft-edge --version | awk '{print $3}')) fi +if [[ -z "$SE_NODE_STEREOTYPE" ]]; then SE_NODE_STEREOTYPE="{\"browserName\": \"${SE_NODE_BROWSER_NAME}\", \"browserVersion\": \"${SE_NODE_BROWSER_VERSION}\", \"platformName\": \"Linux\"}" +else +SE_NODE_STEREOTYPE="$SE_NODE_STEREOTYPE" +fi + echo "[[node.driver-configuration]]" >> "$FILENAME" echo "display-name = \"${SE_NODE_BROWSER_NAME}\"" >> "$FILENAME" echo "stereotype = '${SE_NODE_STEREOTYPE}'" >> "$FILENAME" diff --git a/Video/Dockerfile b/Video/Dockerfile index efc935749..808e8715a 100644 --- a/Video/Dockerfile +++ b/Video/Dockerfile @@ -1,35 +1,29 @@ -FROM jrottenberg/ffmpeg:4.3.1-ubuntu2004 +FROM jrottenberg/ffmpeg:6.0-alpine LABEL authors="Selenium " -#================================================ -# Customize sources for apt-get -#================================================ -RUN echo "deb http://archive.ubuntu.com/ubuntu focal main universe\n" > /etc/apt/sources.list \ - && echo "deb http://archive.ubuntu.com/ubuntu focal-updates main universe\n" >> /etc/apt/sources.list \ - && echo "deb http://security.ubuntu.com/ubuntu focal-security main universe\n" >> /etc/apt/sources.list - -# No interactive frontend during docker build -ENV DEBIAN_FRONTEND=noninteractive \ - DEBCONF_NONINTERACTIVE_SEEN=true - #======================== # Supervisor #======================== -RUN apt-get -qqy update \ - && apt-get upgrade -yq \ - && apt-get -qqy --no-install-recommends install \ - supervisor x11-xserver-utils python3-pip \ - && rm -rf /var/lib/apt/lists/* /var/cache/apt/* +RUN apk update \ + && apk upgrade \ + && apk add --no-cache --update --virtual .build-deps supervisor bash curl jq xset xdpyinfo python3 py3-psutil py3-pip \ + && ln -sf python3 /usr/bin/python \ + && rm -rf /tmp/* /var/cache/apk/* + +ENV PYTHONUNBUFFERED=1 +RUN python3 -m pip install --no-cache --upgrade --no-cache-dir pip urllib3 setuptools requests wheel #====================================== # Add Supervisor configuration files #====================================== +ENV SE_VIDEO_FOLDER /videos +RUN mkdir -p /opt/bin/ +RUN mkdir -p /var/run/supervisor /var/log/supervisor ${SE_VIDEO_FOLDER} + COPY supervisord.conf /etc COPY entry_point.sh video.sh video_ready.py /opt/bin/ -RUN cd /opt/bin && pip install psutil - -RUN mkdir -p /var/run/supervisor /var/log/supervisor /videos +RUN chmod +x /opt/bin/* ENTRYPOINT ["/opt/bin/entry_point.sh"] CMD ["/opt/bin/entry_point.sh"] @@ -41,6 +35,5 @@ ENV SE_FRAME_RATE 15 ENV SE_CODEC libx264 ENV SE_PRESET "-preset ultrafast" ENV FILE_NAME video.mp4 -ENV SE_VIDEO_FOLDER /videos EXPOSE 9000 diff --git a/Video/supervisord.conf b/Video/supervisord.conf index 68d42b8a2..84b7d6ae2 100644 --- a/Video/supervisord.conf +++ b/Video/supervisord.conf @@ -10,6 +10,7 @@ pidfile=/var/run/supervisor/supervisord.pid ; (supervisord pidfile;default sup nodaemon=true ; (start in foreground if true;default false) minfds=1024 ; (min. avail startup file descriptors;default 1024) minprocs=200 ; (min. avail process descriptors;default 200) +user=root ; (default is current user, required if root) [program:video-recording] priority=0 diff --git a/charts/selenium-grid/.helmignore b/charts/selenium-grid/.helmignore index 0e8a0eb36..5bdaa3eb0 100644 --- a/charts/selenium-grid/.helmignore +++ b/charts/selenium-grid/.helmignore @@ -21,3 +21,4 @@ .idea/ *.tmproj .vscode/ +ci/ diff --git a/charts/selenium-grid/CHANGELOG.md b/charts/selenium-grid/CHANGELOG.md index 32a81cbfb..3174bd3b1 100644 --- a/charts/selenium-grid/CHANGELOG.md +++ b/charts/selenium-grid/CHANGELOG.md @@ -2,6 +2,48 @@ All notable changes to this helm chart will be documented in this file. +## :heavy_check_mark: 0.24.0 + +### Added + +- Update tag in docs and files [skip ci] :: Selenium CI Bot +- Bumping chart version :: Diego Molina +- Fix minor issues after PR #1881 and #1981 (#1983) :: Viet Nguyen Duc +- Improve default value for videoRecorder in chart (#1984) :: Viet Nguyen Duc +- Improve chart templates in the section videoRecorder (#1987) :: Viet Nguyen Duc +- Update to Selenium 4.15.0 (#1990) :: Luis Correia +- feat(autoscaling): Unified parameters to set scaled options for browser nodes (#1989) :: Viet Nguyen Duc +- Add chart parameter ingress.paths to configure custom paths (#1994) :: Viet Nguyen Duc +- feat: Adding port to nodes service (#1196) :: Viet Nguyen Duc + +### Changed +- Update image tag to 4.15.0-20231110 + +## :heavy_check_mark: 0.23.0 + +### Added + +- Update tag in docs and files [skip ci] :: Selenium CI Bot +- feat: video recording with pluggable upload container (#1881) :: MÃ¥rten Svantesson +- Update Video/Dockerfile with based image ffmpeg:6.0-alpine (#1981) :: Viet Nguyen Duc + +### Changed +- Update image tag to 4.14.1-20231025 + +## :heavy_check_mark: 0.22.0 + +### Added +- feat(keda): bumped up keda 2.12.0 (#1960) :: Amar Deep Singh +- Add missing Ingress namespace field (#1966) :: Cody Lent + +### Changed +- Update image tag to 4.13.0-20231004 + +## :heavy_check_mark: 0.21.3 + +### Changed +- Update image tag to 4.13.0-20230926 + ## :heavy_check_mark: 0.21.2 ### Changed diff --git a/charts/selenium-grid/Chart.yaml b/charts/selenium-grid/Chart.yaml index 3835c2445..a5786c654 100644 --- a/charts/selenium-grid/Chart.yaml +++ b/charts/selenium-grid/Chart.yaml @@ -2,11 +2,16 @@ apiVersion: v2 name: selenium-grid description: A Helm chart for creating a Selenium Grid Server in Kubernetes type: application -version: 0.21.2 -appVersion: 4.12.1-20230920 +version: 0.25.1 +appVersion: 4.15.0-20231110 icon: https://github.com/SeleniumHQ/docker-selenium/raw/trunk/logo.png dependencies: - repository: https://kedacore.github.io/charts - version: 2.10.2 + version: 2.12.0 name: keda condition: autoscaling.enabled +maintainers: + - name: SeleniumHQ + email: selenium-developers@googlegroups.com +sources: + - https://github.com/SeleniumHQ/docker-selenium diff --git a/charts/selenium-grid/README.md b/charts/selenium-grid/README.md index 2d77ce9fa..8ef7fd933 100644 --- a/charts/selenium-grid/README.md +++ b/charts/selenium-grid/README.md @@ -27,6 +27,8 @@ helm install selenium-grid docker-selenium/selenium-grid --version # In both cases grid exposed by default using ingress. You may want to set hostname for the grid. Default hostname is selenium-grid.local. helm install selenium-grid --set ingress.hostname=selenium-grid.k8s.local docker-selenium/chart/selenium-grid/. +# Verify ingress configuration via kubectl get ingress +# Notes: In case you want to set hostname is selenium-grid.local. You need to add the IP and hostname to the local host file in `/etc/hosts` ``` ## Enable Selenium Grid Autoscaling @@ -83,145 +85,185 @@ For now, global configuration supported is: | Parameter | Default | Description | |---------------------------------------|-------------------|---------------------------------------| -| `global.seleniumGrid.imageTag` | `4.12.1-20230920` | Image tag for all selenium components | -| `global.seleniumGrid.nodesImageTag` | `4.12.1-20230920` | Image tag for browser's nodes | +| `global.seleniumGrid.imageTag` | `4.15.0-20231110` | Image tag for all selenium components | +| `global.seleniumGrid.nodesImageTag` | `4.15.0-20231110` | Image tag for browser's nodes | | `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 | This table contains the configuration parameters of the chart and their default values: -| Parameter | Default | Description | -|---------------------------------------------|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------| -| `isolateComponents` | `false` | Deploy Router, Distributor, EventBus, SessionMap and Nodes separately | -| `serviceAccount.create` | `true` | Enable or disable creation of service account (if `false`, `serviceAccount.name` MUST be specified | -| `serviceAccount.name` | `""` | Name of the service account to be made or existing service account to use for all deployments and jobs | -| `serviceAccount.annotations` | `{}` | Custom annotations for service account | -| `busConfigMap.name` | `selenium-event-bus-config` | Name of the configmap that contains SE_EVENT_BUS_HOST, SE_EVENT_BUS_PUBLISH_PORT and SE_EVENT_BUS_SUBSCRIBE_PORT variables | -| `busConfigMap.annotations` | `{}` | Custom annotations for configmap | -| `nodeConfigMap.name` | `selenium-node-config` | Name of the configmap that contains common environment variables for browser nodes | -| `nodeConfigMap.annotations` | `{}` | Custom annotations for configmap | -| `ingress.enabled` | `true` | Enable or disable ingress resource | -| `ingress.className` | `""` | Name of ingress class to select which controller will implement ingress resource | -| `ingress.annotations` | `{}` | Custom annotations for ingress resource | -| `ingress.hostname` | `selenium-grid.local` | Default host for the ingress resource | -| `ingress.path` | `/` | Default host path for the ingress resource | -| `ingress.tls` | `[]` | TLS backend configuration for ingress resource | -| `autoscaling.enableWithExistingKEDA` | `false` | Enable autoscaling of browser nodes. | -| `autoscaling.enabled` | `false` | Same as above plus installation of KEDA | -| `autoscaling.scalingType` | `job` | Which typ of KEDA scaling to use: job or deployment | -| `autoscaling.scaledJobOptions` | See `values.yaml` | Options for KEDA ScaledJobs | -| `autoscaling.deregisterLifecycle` | See `values.yaml` | Lifecycle applied to pods of deployments controlled by KEDA. Makes the node deregister from selenium hub | -| `chromeNode.enabled` | `true` | Enable chrome nodes | -| `chromeNode.deploymentEnabled` | `true` | Enable creation of Deployment for chrome nodes | -| `chromeNode.replicas` | `1` | Number of chrome nodes. Disabled if autoscaling is enabled. | -| `chromeNode.imageName` | `selenium/node-chrome` | Image of chrome nodes | -| `chromeNode.imageTag` | `4.12.1-20230920` | Image of chrome nodes | -| `chromeNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `chromeNode.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `chromeNode.ports` | `[5555]` | Port list to enable on container | -| `chromeNode.seleniumPort` | `5900` | Selenium port (spec.ports[0].targetPort in kubernetes service) | -| `chromeNode.seleniumServicePort` | `6900` | Selenium port exposed in service (spec.ports[0].port in kubernetes service) | -| `chromeNode.annotations` | `{}` | Annotations for chrome-node pods | -| `chromeNode.labels` | `{}` | Labels for chrome-node pods | -| `chromeNode.resources` | `See values.yaml` | Resources for chrome-node pods | -| `chromeNode.securityContext` | `See values.yaml` | Security context for chrome-node pods | -| `chromeNode.tolerations` | `[]` | Tolerations for chrome-node pods | -| `chromeNode.nodeSelector` | `{}` | Node Selector for chrome-node pods | -| `chromeNode.affinity` | `{}` | Affinity for chrome-node pods | -| `chromeNode.hostAliases` | `nil` | Custom host aliases for chrome nodes | -| `chromeNode.priorityClassName` | `""` | Priority class name for chrome-node pods | -| `chromeNode.extraEnvironmentVariables` | `nil` | Custom environment variables for chrome nodes | -| `chromeNode.extraEnvFrom` | `nil` | Custom environment taken from `configMap` or `secret` variables for chrome nodes | -| `chromeNode.service.enabled` | `true` | Create a service for node | -| `chromeNode.service.type` | `ClusterIP` | Service type | -| `chromeNode.service.annotations` | `{}` | Custom annotations for service | -| `chromeNode.dshmVolumeSizeLimit` | `1Gi` | Size limit for DSH volume mounted in container (if not set, default is "1Gi") | -| `chromeNode.startupProbe` | `{}` | Probe to check pod is started successfully | -| `chromeNode.livenessProbe` | `{}` | Liveness probe settings | -| `chromeNode.terminationGracePeriodSeconds` | `30` | Time to graceful terminate container (default: 30s) | -| `chromeNode.lifecycle` | `{}` | hooks to make pod correctly shutdown or started | -| `chromeNode.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod | -| `chromeNode.extraVolumes` | `[]` | Extra Volumes declarations to be used in the pod (can be any supported volume type: ConfigMap, Secret, PVC, NFS, etc.) | -| `chromeNode.hpa.url` | `{{ include "seleniumGrid.graphqlURL" . }}` | Graphql Url of the hub or the router | -| `chromeNode.hpa.browserName` | `chrome` | BrowserName from the capability | -| `chromeNode.hpa.browserVersion` | `` | BrowserVersion from the capability | -| `chromeNode.maxReplicaCount` | `8` | Max number of replicas that this browsernode can auto scale up to | -| `chromeNode.minReplicaCount` | `1` | Min number of replicas that this browsernode has when jobs are running | -| `firefoxNode.enabled` | `true` | Enable firefox nodes | -| `firefoxNode.deploymentEnabled` | `true` | Enable creation of Deployment for firefox nodes | -| `firefoxNode.replicas` | `1` | Number of firefox nodes. Disabled if autoscaling is enabled. | -| `firefoxNode.imageName` | `selenium/node-firefox` | Image of firefox nodes | -| `firefoxNode.imageTag` | `4.12.1-20230920` | Image of firefox nodes | -| `firefoxNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `firefoxNode.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `firefoxNode.ports` | `[5555]` | Port list to enable on container | -| `firefoxNode.seleniumPort` | `5900` | Selenium port (spec.ports[0].targetPort in kubernetes service) | -| `firefoxNode.seleniumServicePort` | `6900` | Selenium port exposed in service (spec.ports[0].port in kubernetes service) | -| `firefoxNode.annotations` | `{}` | Annotations for firefox-node pods | -| `firefoxNode.labels` | `{}` | Labels for firefox-node pods | -| `firefoxNode.resources` | `See values.yaml` | Resources for firefox-node pods | -| `firefoxNode.securityContext` | `See values.yaml` | Security context for firefox-node pods | -| `firefoxNode.tolerations` | `[]` | Tolerations for firefox-node pods | -| `firefoxNode.nodeSelector` | `{}` | Node Selector for firefox-node pods | -| `firefoxNode.affinity` | `{}` | Affinity for firefox-node pods | -| `firefoxNode.hostAliases` | `nil` | Custom host aliases for firefox nodes | -| `firefoxNode.priorityClassName` | `""` | Priority class name for firefox-node pods | -| `firefoxNode.extraEnvironmentVariables` | `nil` | Custom environment variables for firefox nodes | -| `firefoxNode.extraEnvFrom` | `nil` | Custom environment variables taken from `configMap` or `secret` for firefox nodes | -| `firefoxNode.service.enabled` | `true` | Create a service for node | -| `firefoxNode.service.type` | `ClusterIP` | Service type | -| `firefoxNode.service.annotations` | `{}` | Custom annotations for service | -| `firefoxNode.dshmVolumeSizeLimit` | `1Gi` | Size limit for DSH volume mounted in container (if not set, default is "1Gi") | -| `firefoxNode.startupProbe` | `{}` | Probe to check pod is started successfully | -| `firefoxNode.livenessProbe` | `{}` | Liveness probe settings | -| `firefoxNode.terminationGracePeriodSeconds` | `30` | Time to graceful terminate container (default: 30s) | -| `firefoxNode.lifecycle` | `{}` | hooks to make pod correctly shutdown or started | -| `firefoxNode.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod | -| `firefoxNode.extraVolumes` | `[]` | Extra Volumes declarations to be used in the pod (can be any supported volume type: ConfigMap, Secret, PVC, NFS, etc.) | -| `firefoxNode.hpa.url` | `{{ include "seleniumGrid.graphqlURL" . }}` | Graphql Url of the hub or the router | -| `firefoxNode.hpa.browserName` | `firefox` | BrowserName from the capability | -| `firefoxNode.hpa.browserVersion` | `` | BrowserVersion from the capability | -| `firefoxNode.maxReplicaCount` | `8` | Max number of replicas that this browsernode can auto scale up to | -| `firefoxNode.minReplicaCount` | `1` | Min number of replicas that this browsernode has when jobs are running | -| `edgeNode.enabled` | `true` | Enable edge nodes | -| `edgeNode.deploymentEnabled` | `true` | Enable creation of Deployment for edge nodes | -| `edgeNode.replicas` | `1` | Number of edge nodes. Disabled if autoscaling is enabled. | -| `edgeNode.imageName` | `selenium/node-edge` | Image of edge nodes | -| `edgeNode.imageTag` | `4.12.1-20230920` | Image of edge nodes | -| `edgeNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `edgeNode.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `edgeNode.ports` | `[5555]` | Port list to enable on container | -| `edgeNode.seleniumPort` | `5900` | Selenium port (spec.ports[0].targetPort in kubernetes service) | -| `edgeNode.seleniumServicePort` | `6900` | Selenium port exposed in service (spec.ports[0].port in kubernetes service) | -| `edgeNode.annotations` | `{}` | Annotations for edge-node pods | -| `edgeNode.labels` | `{}` | Labels for edge-node pods | -| `edgeNode.resources` | `See values.yaml` | Resources for edge-node pods | -| `edgeNode.securityContext` | `See values.yaml` | Security context for edge-node pods | -| `edgeNode.tolerations` | `[]` | Tolerations for edge-node pods | -| `edgeNode.nodeSelector` | `{}` | Node Selector for edge-node pods | -| `edgeNode.affinity` | `{}` | Affinity for edge-node pods | -| `edgeNode.hostAliases` | `nil` | Custom host aliases for edge nodes | -| `edgeNode.priorityClassName` | `""` | Priority class name for edge-node pods | -| `edgeNode.extraEnvironmentVariables` | `nil` | Custom environment variables for firefox nodes | -| `edgeNode.extraEnvFrom` | `nil` | Custom environment taken from `configMap` or `secret` variables for firefox nodes | -| `edgeNode.service.enabled` | `true` | Create a service for node | -| `edgeNode.service.type` | `ClusterIP` | Service type | -| `edgeNode.service.annotations` | `{}` | Custom annotations for service | -| `edgeNode.dshmVolumeSizeLimit` | `1Gi` | Size limit for DSH volume mounted in container (if not set, default is "1Gi") | -| `edgeNode.startupProbe` | `{}` | Probe to check pod is started successfully | -| `edgeNode.livenessProbe` | `{}` | Liveness probe settings | -| `edgeNode.terminationGracePeriodSeconds` | `30` | Time to graceful terminate container (default: 30s) | -| `edgeNode.lifecycle` | `{}` | hooks to make pod correctly shutdown or started | -| `edgeNode.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod | -| `edgeNode.extraVolumes` | `[]` | Extra Volumes declarations to be used in the pod (can be any supported volume type: ConfigMap, Secret, PVC, NFS, etc.) | -| `edgeNode.hpa.url` | `{{ include "seleniumGrid.graphqlURL" . }}` | Graphql Url of the hub or the router | -| `edgeNode.hpa.browserName` | `edge` | BrowserName from the capability | -| `edgeNode.hpa.browserVersion` | `` | BrowserVersion from the capability | -| `edgeNode.maxReplicaCount` | `8` | Max number of replicas that this browsernode can auto scale up to | -| `edgeNode.minReplicaCount` | `1` | Min number of replicas that this browsernode has when jobs are running | -| `customLabels` | `{}` | Custom labels for k8s resources | -| `customLabels` | `{}` | Custom labels for k8s resources | +| Parameter | Default | Description | +|-----------------------------------------------|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------| +| `basicAuth.enabled` | `true` | Enable or disable basic auth for Selenium Grid | +| `basicAuth.username` | `admin` | Username of basic auth for Selenium Grid | +| `basicAuth.password` | `admin` | Password of basic auth for Selenium Grid | +| `isolateComponents` | `false` | Deploy Router, Distributor, EventBus, SessionMap and Nodes separately | +| `serviceAccount.create` | `true` | Enable or disable creation of service account (if `false`, `serviceAccount.name` MUST be specified | +| `serviceAccount.name` | `""` | Name of the service account to be made or existing service account to use for all deployments and jobs | +| `serviceAccount.annotations` | `{}` | Custom annotations for service account | +| `busConfigMap.name` | `selenium-event-bus-config` | Name of the configmap that contains SE_EVENT_BUS_HOST, SE_EVENT_BUS_PUBLISH_PORT and SE_EVENT_BUS_SUBSCRIBE_PORT variables | +| `busConfigMap.annotations` | `{}` | Custom annotations for configmap | +| `nodeConfigMap.name` | `selenium-node-config` | Name of the configmap that contains common environment variables for browser nodes | +| `nodeConfigMap.annotations` | `{}` | Custom annotations for configmap | +| `ingress.enabled` | `true` | Enable or disable ingress resource | +| `ingress.className` | `""` | Name of ingress class to select which controller will implement ingress resource | +| `ingress.annotations` | `{}` | Custom annotations for ingress resource | +| `ingress.hostname` | `` | Default host for the ingress resource | +| `ingress.path` | `/` | Default host path for the ingress resource | +| `ingress.pathType` | `Prefix` | Default path type for the ingress resource | +| `ingress.paths` | `[]` | List of paths config for the ingress resource. This will override the default path | +| `ingress.tls` | `[]` | TLS backend configuration for ingress resource | +| `autoscaling.enableWithExistingKEDA` | `false` | Enable autoscaling of browser nodes. | +| `autoscaling.enabled` | `false` | Same as above plus installation of KEDA | +| `autoscaling.scalingType` | `job` | Which typ of KEDA scaling to use: `job` or `deployment` | +| `autoscaling.scaledOptions` | See `values.yaml` | Common options for KEDA scaled resources (both ScaledJobs and ScaledObjects) | +| `autoscaling.scaledOptions.minReplicaCount` | `0` | Min number of replicas that each browser nodes has when autoscaling | +| `autoscaling.scaledOptions.maxReplicaCount` | `8` | Max number of replicas that each browser nodes can auto scale up to | +| `autoscaling.scaledOptions.pollingInterval` | `10` | The interval to check each trigger on | +| `autoscaling.scaledJobOptions` | See `values.yaml` | Options for KEDA ScaledJobs (when `scalingType` is set to `job`) | +| `autoscaling.scaledObjectOptions` | See `values.yaml` | Options for KEDA ScaledObjects (when `scalingType` is set to `deployment`) | +| `autoscaling.deregisterLifecycle` | See `values.yaml` | Lifecycle applied to pods of deployments controlled by KEDA. Makes the node deregister from selenium hub | +| `chromeNode.enabled` | `true` | Enable chrome nodes | +| `chromeNode.deploymentEnabled` | `true` | Enable creation of Deployment for chrome nodes | +| `chromeNode.replicas` | `1` | Number of chrome nodes. Disabled if autoscaling is enabled. | +| `chromeNode.imageName` | `selenium/node-chrome` | Image of chrome nodes | +| `chromeNode.imageTag` | `4.15.0-20231110` | Image of chrome nodes | +| `chromeNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `chromeNode.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `chromeNode.ports` | `[5555]` | Port list to enable on container | +| `chromeNode.seleniumPort` | `5900` | Selenium port (spec.ports[0].targetPort in kubernetes service) | +| `chromeNode.seleniumServicePort` | `6900` | Selenium port exposed in service (spec.ports[0].port in kubernetes service) | +| `chromeNode.annotations` | `{}` | Annotations for chrome-node pods | +| `chromeNode.labels` | `{}` | Labels for chrome-node pods | +| `chromeNode.resources` | `See values.yaml` | Resources for chrome-node pods | +| `chromeNode.securityContext` | `See values.yaml` | Security context for chrome-node pods | +| `chromeNode.tolerations` | `[]` | Tolerations for chrome-node pods | +| `chromeNode.nodeSelector` | `{}` | Node Selector for chrome-node pods | +| `chromeNode.affinity` | `{}` | Affinity for chrome-node pods | +| `chromeNode.hostAliases` | `nil` | Custom host aliases for chrome nodes | +| `chromeNode.priorityClassName` | `""` | Priority class name for chrome-node pods | +| `chromeNode.extraEnvironmentVariables` | `nil` | Custom environment variables for chrome nodes | +| `chromeNode.extraEnvFrom` | `nil` | Custom environment taken from `configMap` or `secret` variables for chrome nodes | +| `chromeNode.service.enabled` | `true` | Create a service for node | +| `chromeNode.service.type` | `ClusterIP` | Service type | +| `chromeNode.service.loadBalancerIP` | `` | Set specific loadBalancerIP when serviceType is LoadBalancer | +| `chromeNode.service.ports` | `[]` | Extra ports exposed in node service | +| `chromeNode.service.annotations` | `{}` | Custom annotations for service | +| `chromeNode.dshmVolumeSizeLimit` | `1Gi` | Size limit for DSH volume mounted in container (if not set, default is "1Gi") | +| `chromeNode.startupProbe` | `{}` | Probe to check pod is started successfully | +| `chromeNode.livenessProbe` | `{}` | Liveness probe settings | +| `chromeNode.terminationGracePeriodSeconds` | `30` | Time to graceful terminate container (default: 30s) | +| `chromeNode.lifecycle` | `{}` | hooks to make pod correctly shutdown or started | +| `chromeNode.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod | +| `chromeNode.extraVolumes` | `[]` | Extra Volumes declarations to be used in the pod (can be any supported volume type: ConfigMap, Secret, PVC, NFS, etc.) | +| `chromeNode.hpa.url` | `{{ include "seleniumGrid.graphqlURL" . }}` | Graphql Url of the hub or the router | +| `chromeNode.hpa.browserName` | `chrome` | BrowserName from the capability | +| `chromeNode.hpa.browserVersion` | `` | BrowserVersion from the capability | +| `chromeNode.scaledOptions` | See `values.yaml` | Override the global `autoscaling.scaledOptions` with specific scaled options for chrome nodes | +| `chromeNode.scaledJobOptions` | See `values.yaml` | Override the global `autoscaling.scaledJobOptions` with specific scaled options for chrome nodes | +| `chromeNode.scaledObjectOptions` | See `values.yaml` | Override the global `autoscaling.scaledObjectOptions` with specific scaled options for chrome nodes | +| `firefoxNode.enabled` | `true` | Enable firefox nodes | +| `firefoxNode.deploymentEnabled` | `true` | Enable creation of Deployment for firefox nodes | +| `firefoxNode.replicas` | `1` | Number of firefox nodes. Disabled if autoscaling is enabled. | +| `firefoxNode.imageName` | `selenium/node-firefox` | Image of firefox nodes | +| `firefoxNode.imageTag` | `4.15.0-20231110` | Image of firefox nodes | +| `firefoxNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `firefoxNode.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `firefoxNode.ports` | `[5555]` | Port list to enable on container | +| `firefoxNode.seleniumPort` | `5900` | Selenium port (spec.ports[0].targetPort in kubernetes service) | +| `firefoxNode.seleniumServicePort` | `6900` | Selenium port exposed in service (spec.ports[0].port in kubernetes service) | +| `firefoxNode.annotations` | `{}` | Annotations for firefox-node pods | +| `firefoxNode.labels` | `{}` | Labels for firefox-node pods | +| `firefoxNode.resources` | `See values.yaml` | Resources for firefox-node pods | +| `firefoxNode.securityContext` | `See values.yaml` | Security context for firefox-node pods | +| `firefoxNode.tolerations` | `[]` | Tolerations for firefox-node pods | +| `firefoxNode.nodeSelector` | `{}` | Node Selector for firefox-node pods | +| `firefoxNode.affinity` | `{}` | Affinity for firefox-node pods | +| `firefoxNode.hostAliases` | `nil` | Custom host aliases for firefox nodes | +| `firefoxNode.priorityClassName` | `""` | Priority class name for firefox-node pods | +| `firefoxNode.extraEnvironmentVariables` | `nil` | Custom environment variables for firefox nodes | +| `firefoxNode.extraEnvFrom` | `nil` | Custom environment variables taken from `configMap` or `secret` for firefox nodes | +| `firefoxNode.service.enabled` | `true` | Create a service for node | +| `firefoxNode.service.type` | `ClusterIP` | Service type | +| `firefoxNode.service.loadBalancerIP` | `` | Set specific loadBalancerIP when serviceType is LoadBalancer | +| `firefoxNode.service.ports` | `[]` | Extra ports exposed in node service | +| `firefoxNode.service.annotations` | `{}` | Custom annotations for service | +| `firefoxNode.dshmVolumeSizeLimit` | `1Gi` | Size limit for DSH volume mounted in container (if not set, default is "1Gi") | +| `firefoxNode.startupProbe` | `{}` | Probe to check pod is started successfully | +| `firefoxNode.livenessProbe` | `{}` | Liveness probe settings | +| `firefoxNode.terminationGracePeriodSeconds` | `30` | Time to graceful terminate container (default: 30s) | +| `firefoxNode.lifecycle` | `{}` | hooks to make pod correctly shutdown or started | +| `firefoxNode.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod | +| `firefoxNode.extraVolumes` | `[]` | Extra Volumes declarations to be used in the pod (can be any supported volume type: ConfigMap, Secret, PVC, NFS, etc.) | +| `firefoxNode.hpa.url` | `{{ include "seleniumGrid.graphqlURL" . }}` | Graphql Url of the hub or the router | +| `firefoxNode.hpa.browserName` | `firefox` | BrowserName from the capability | +| `firefoxNode.hpa.browserVersion` | `` | BrowserVersion from the capability | +| `firefoxNode.scaledOptions` | See `values.yaml` | Override the global `autoscaling.scaledOptions` with specific scaled options for firefox nodes | +| `firefoxNode.scaledJobOptions` | See `values.yaml` | Override the global `autoscaling.scaledJobOptions` with specific scaled options for firefox nodes | +| `firefoxNode.scaledObjectOptions` | See `values.yaml` | Override the global `autoscaling.scaledObjectOptions` with specific scaled options for firefox nodes | +| `edgeNode.enabled` | `true` | Enable edge nodes | +| `edgeNode.deploymentEnabled` | `true` | Enable creation of Deployment for edge nodes | +| `edgeNode.replicas` | `1` | Number of edge nodes. Disabled if autoscaling is enabled. | +| `edgeNode.imageName` | `selenium/node-edge` | Image of edge nodes | +| `edgeNode.imageTag` | `4.15.0-20231110` | Image of edge nodes | +| `edgeNode.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `edgeNode.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `edgeNode.ports` | `[5555]` | Port list to enable on container | +| `edgeNode.seleniumPort` | `5900` | Selenium port (spec.ports[0].targetPort in kubernetes service) | +| `edgeNode.seleniumServicePort` | `6900` | Selenium port exposed in service (spec.ports[0].port in kubernetes service) | +| `edgeNode.annotations` | `{}` | Annotations for edge-node pods | +| `edgeNode.labels` | `{}` | Labels for edge-node pods | +| `edgeNode.resources` | `See values.yaml` | Resources for edge-node pods | +| `edgeNode.securityContext` | `See values.yaml` | Security context for edge-node pods | +| `edgeNode.tolerations` | `[]` | Tolerations for edge-node pods | +| `edgeNode.nodeSelector` | `{}` | Node Selector for edge-node pods | +| `edgeNode.affinity` | `{}` | Affinity for edge-node pods | +| `edgeNode.hostAliases` | `nil` | Custom host aliases for edge nodes | +| `edgeNode.priorityClassName` | `""` | Priority class name for edge-node pods | +| `edgeNode.extraEnvironmentVariables` | `nil` | Custom environment variables for firefox nodes | +| `edgeNode.extraEnvFrom` | `nil` | Custom environment taken from `configMap` or `secret` variables for firefox nodes | +| `edgeNode.service.enabled` | `true` | Create a service for node | +| `edgeNode.service.type` | `ClusterIP` | Service type | +| `edgeNode.service.loadBalancerIP` | `` | Set specific loadBalancerIP when serviceType is LoadBalancer | +| `edgeNode.service.ports` | `[]` | Extra ports exposed in node service | +| `edgeNode.service.annotations` | `{}` | Custom annotations for service | +| `edgeNode.dshmVolumeSizeLimit` | `1Gi` | Size limit for DSH volume mounted in container (if not set, default is "1Gi") | +| `edgeNode.startupProbe` | `{}` | Probe to check pod is started successfully | +| `edgeNode.livenessProbe` | `{}` | Liveness probe settings | +| `edgeNode.terminationGracePeriodSeconds` | `30` | Time to graceful terminate container (default: 30s) | +| `edgeNode.lifecycle` | `{}` | hooks to make pod correctly shutdown or started | +| `edgeNode.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod | +| `edgeNode.extraVolumes` | `[]` | Extra Volumes declarations to be used in the pod (can be any supported volume type: ConfigMap, Secret, PVC, NFS, etc.) | +| `edgeNode.hpa.url` | `{{ include "seleniumGrid.graphqlURL" . }}` | Graphql Url of the hub or the router | +| `edgeNode.hpa.browserName` | `edge` | BrowserName from the capability | +| `edgeNode.hpa.browserVersion` | `` | BrowserVersion from the capability | +| `edgeNode.scaledOptions` | See `values.yaml` | Override the global `autoscaling.scaledOptions` with specific scaled options for edge nodes | +| `edgeNode.scaledJobOptions` | See `values.yaml` | Override the global `autoscaling.scaledJobOptions` with specific scaled options for edge nodes | +| `edgeNode.scaledObjectOptions` | See `values.yaml` | Override the global `autoscaling.scaledObjectOptions` with specific scaled options for edge nodes | +| `videoRecorder.enabled` | `false` | Enable video recorder for node | +| `videoRecorder.imageName` | `selenium/video` | Selenium video recoder image name | +| `videoRecorder.imageTag` | `ffmpeg-6.0-20231110` | Image tag of video recorder | +| `videoRecorder.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `videoRecorder.uploader` | `false` | Name of the uploader to use. The value `false` is used to disable uploader. Supported default `s3` | +| `videoRecorder.uploadDestinationPrefix` | `false` | Destination URL for uploading video file. The value `false` is used to disable the uploading | +| `videoRecorder.ports` | `[9000]` | Port list to enable on video recorder container | +| `videoRecorder.resources` | `See values.yaml` | Resources for video recorder | +| `videoRecorder.extraEnvironmentVariables` | `nil` | Custom environment variables for video recorder | +| `videoRecorder.extraEnvFrom` | `nil` | Custom environment taken from `configMap` or `secret` variables for video recorder | +| `videoRecorder.terminationGracePeriodSeconds` | `30` | Time to graceful terminate container (default: 30s) | +| `videoRecorder.startupProbe` | `{}` | Probe to check pod is started successfully | +| `videoRecorder.livenessProbe` | `{}` | Liveness probe settings | +| `videoRecorder.volume.name.folder` | `video` | Name is used to set for the volume to persist and share output video folder in container | +| `videoRecorder.volume.name.scripts` | `video-scripts` | Name is used to set for the volume to persist and share video recorder scripts in container | +| `videoRecorder.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod | +| `videoRecorder.extraVolumes` | `[]` | Extra Volumes declarations to be used in the pod (can be any supported volume type: ConfigMap, Secret, PVC, NFS, etc.) | +| `videoRecorder.s3` | `See values.yaml` | Container spec for the uploader if `videoRecorder.uploader` is `s3`. Similarly, create for your new uploader | +| `videoRecorder.s3.resources` | `See values.yaml` | Resources for video uploader | +| `videoRecorder.s3.extraEnvironmentVariables` | `` | Custom environment variables for video uploader container | +| `videoRecorder.s3.extraEnvFrom` | `` | Custom environment taken from `configMap` or `secret` variables for video uploader | +| `videoRecorder.s3.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod of video uploader | +| `customLabels` | `{}` | Custom labels for k8s resources | ### Configuration of KEDA diff --git a/charts/selenium-grid/ci/overrideNameChrome-values.yaml b/charts/selenium-grid/ci/overrideNameChrome-values.yaml new file mode 100644 index 000000000..6fe143648 --- /dev/null +++ b/charts/selenium-grid/ci/overrideNameChrome-values.yaml @@ -0,0 +1,9 @@ +# These desired is used to test the overrideName of the component +hub: + nameOverride: my-hub-name +chromeNode: + nameOverride: my-chrome-name +edgeNode: + enabled: false +firefoxNode: + enabled: false diff --git a/charts/selenium-grid/ci/overrideNameEdge-values.yaml b/charts/selenium-grid/ci/overrideNameEdge-values.yaml new file mode 100644 index 000000000..11f20066e --- /dev/null +++ b/charts/selenium-grid/ci/overrideNameEdge-values.yaml @@ -0,0 +1,9 @@ +# These desired is used to test the overrideName of the component +hub: + nameOverride: my-hub-name +chromeNode: + enabled: false +edgeNode: + nameOverride: my-edge-name +firefoxNode: + enabled: false diff --git a/charts/selenium-grid/ci/overrideNameFirefox-values.yaml b/charts/selenium-grid/ci/overrideNameFirefox-values.yaml new file mode 100644 index 000000000..dcf4670ed --- /dev/null +++ b/charts/selenium-grid/ci/overrideNameFirefox-values.yaml @@ -0,0 +1,9 @@ +# These desired is used to test the overrideName of the component +hub: + nameOverride: my-hub-name +chromeNode: + enabled: false +edgeNode: + enabled: false +firefoxNode: + nameOverride: my-firefox-name diff --git a/charts/selenium-grid/templates/NOTES.txt b/charts/selenium-grid/templates/NOTES.txt index 80920a44f..ce79f74b5 100644 --- a/charts/selenium-grid/templates/NOTES.txt +++ b/charts/selenium-grid/templates/NOTES.txt @@ -1,7 +1,7 @@ Selenium Grid Server deployed successfully. {{- $svcName := ternary (include "seleniumGrid.router.fullname" . ) (include "seleniumGrid.hub.fullname" . ) .Values.isolateComponents }} -{{- $appName := ternary "selenium-router" "selenium-hub" .Values.isolateComponents }} +{{- $appName := ternary (include "seleniumGrid.router.fullname" . ) (include "seleniumGrid.hub.fullname" . ) .Values.isolateComponents }} {{- $serviceType := ternary .Values.components.router.serviceType .Values.hub.serviceType .Values.isolateComponents }} {{- $port := ternary .Values.components.router.port .Values.hub.port .Values.isolateComponents }} {{- $localUrl := ternary "http://localhost:PORT" "http://localhost:PORT/wd/hub" .Values.isolateComponents }} diff --git a/charts/selenium-grid/templates/_helpers.tpl b/charts/selenium-grid/templates/_helpers.tpl index 694b7a5c9..5fa362094 100644 --- a/charts/selenium-grid/templates/_helpers.tpl +++ b/charts/selenium-grid/templates/_helpers.tpl @@ -87,6 +87,13 @@ Service Account fullname {{- .Values.serviceAccount.name | default "selenium-serviceaccount" | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{/* +Video ConfigMap fullname +*/}} +{{- define "seleniumGrid.video.fullname" -}} +{{- default "selenium-video" .Values.videoRecorder.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{/* Is autoscaling using KEDA enabled */}} @@ -94,6 +101,46 @@ Is autoscaling using KEDA enabled {{- or .Values.autoscaling.enabled .Values.autoscaling.enableWithExistingKEDA | ternary "true" "" -}} {{- end -}} +{{/* +Common autoscaling spec template +*/}} +{{- define "seleniumGrid.autoscalingTemplate" -}} +{{- $spec := toYaml (dict) -}} +{{/* Merge with precedence from right to left */}} +{{- with .Values.autoscaling.scaledOptions -}} + {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} +{{- end -}} +{{- with .node.scaledOptions -}} + {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} +{{- end -}} +{{- if eq .Values.autoscaling.scalingType "deployment" -}} + {{- with .Values.autoscaling.scaledObjectOptions -}} + {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} + {{- end -}} + {{- with .node.scaledObjectOptions -}} + {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} + {{- end -}} + {{- $spec = mergeOverwrite ($spec | fromYaml) (dict "scaleTargetRef" (dict "name" .name)) | toYaml -}} +{{- else if eq .Values.autoscaling.scalingType "job" -}} + {{- with .Values.autoscaling.scaledJobOptions -}} + {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} + {{- end -}} + {{- with .node.scaledJobOptions -}} + {{- $spec = mergeOverwrite ($spec | fromYaml) . | toYaml -}} + {{- end -}} + {{- $spec = mergeOverwrite ($spec | fromYaml) (dict "jobTargetRef" .podTemplate) | toYaml -}} +{{- end -}} +{{- if and $spec (ne $spec "{}") -}} + {{ tpl $spec $ }} +{{- end -}} +{{- if not .Values.autoscaling.scaledOptions.triggers }} +triggers: + - type: selenium-grid + {{- with .node.hpa }} + metadata: {{- tpl (toYaml .) $ | nindent 6 }} + {{- end }} +{{- end }} +{{- end -}} {{/* Common pod template @@ -137,7 +184,7 @@ template: - configMapRef: name: {{ .Values.nodeConfigMap.name }} {{- with .node.extraEnvFrom }} - {{- toYaml . | nindent 10 }} + {{- tpl (toYaml .) $ | nindent 10 }} {{- end }} {{- if gt (len .node.ports) 0 }} ports: @@ -150,7 +197,7 @@ template: - name: dshm mountPath: /dev/shm {{- if .node.extraVolumeMounts }} - {{- toYaml .node.extraVolumeMounts | nindent 10 }} + {{- tpl (toYaml .node.extraVolumeMounts) $ | nindent 10 }} {{- end }} {{- with .node.resources }} resources: {{- toYaml . | nindent 10 }} @@ -168,6 +215,69 @@ template: {{- if .node.sidecars }} {{- toYaml .node.sidecars | nindent 6 }} {{- end }} + {{- if .Values.videoRecorder.enabled }} + - name: video + image: {{ printf "%s:%s" .Values.videoRecorder.imageName .Values.videoRecorder.imageTag }} + imagePullPolicy: {{ .Values.videoRecorder.imagePullPolicy }} + env: + - name: UPLOAD_DESTINATION_PREFIX + value: {{ .Values.videoRecorder.uploadDestinationPrefix | quote }} + {{- with .Values.videoRecorder.extraEnvironmentVariables }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} + envFrom: + - configMapRef: + name: {{ .Values.busConfigMap.name }} + {{- with .Values.videoRecorder.extraEnvFrom }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} + {{- if gt (len .Values.videoRecorder.ports) 0 }} + ports: + {{- range .Values.videoRecorder.ports }} + - containerPort: {{ . }} + protocol: TCP + {{- end }} + {{- end }} + volumeMounts: + - name: dshm + mountPath: /dev/shm + {{- tpl (include "seleniumGrid.video.volumeMounts" .) $ | nindent 8 }} + {{- with .Values.videoRecorder.resources }} + resources: {{- toYaml . | nindent 10 }} + {{- end }} + {{- with .Values.videoRecorder.startupProbe }} + startupProbe: {{- toYaml . | nindent 10 }} + {{- end }} + {{- with .Values.videoRecorder.livenessProbe }} + livenessProbe: {{- toYaml . | nindent 10 }} + {{- end }} + {{- if .uploader }} + - name: uploader + image: {{ printf "%s:%s" .uploader.imageName .uploader.imageTag }} + imagePullPolicy: {{ .uploader.imagePullPolicy }} + {{- with .uploader.command }} + command: {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} + {{- with .uploader.args }} + args: {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} + {{- with .uploader.extraEnvironmentVariables }} + env: {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} + {{- with .uploader.extraEnvFrom }} + envFrom: + {{- tpl (toYaml .) $ | nindent 10 }} + {{- end }} + volumeMounts: + {{- tpl (include "seleniumGrid.video.uploader.volumeMounts" .) $ | nindent 8 }} + {{- with .uploader.resources }} + resources: {{- toYaml . | nindent 10 }} + {{- end }} + {{- with .uploader.securityContext }} + securityContext: {{- toYaml . | nindent 10 }} + {{- end }} + {{- end }} + {{- end }} {{- if or .Values.global.seleniumGrid.imagePullSecret .node.imagePullSecret }} imagePullSecrets: - name: {{ default .Values.global.seleniumGrid.imagePullSecret .node.imagePullSecret }} @@ -175,6 +285,9 @@ template: {{- with .node.nodeSelector }} nodeSelector: {{- toYaml . | nindent 6 }} {{- end }} + {{- with .node.affinity }} + affinity: {{- toYaml . | nindent 6 }} + {{- end }} {{- with .node.tolerations }} tolerations: {{ toYaml . | nindent 4 }} @@ -189,7 +302,10 @@ template: medium: Memory sizeLimit: {{ default "1Gi" .node.dshmVolumeSizeLimit }} {{- if .node.extraVolumes }} - {{ toYaml .node.extraVolumes | nindent 6 }} + {{ tpl (toYaml .node.extraVolumes) $ | nindent 6 }} + {{- end }} + {{- if .Values.videoRecorder.enabled }} + {{- tpl (include "seleniumGrid.video.volumes" .) $ | nindent 6 }} {{- end }} {{- end -}} @@ -224,3 +340,102 @@ deployment preStop hook to deregister from the selenium hub. lifecycle: {{ $lifecycle | nindent 2 }} {{- end -}} {{- end -}} + +{{/* +Default specs of VolumeMounts and Volumes for video recorder +*/}} +{{- define "seleniumGrid.video.volume.name.folder" -}} +{{- $name := default "video" (((.Values.videoRecorder).volume).name).folder -}} +{{- $name -}} +{{- end -}} + +{{- define "seleniumGrid.video.volume.name.scripts" -}} +{{- $name := default "video-scripts" (((.Values.videoRecorder).volume).name).scripts -}} +{{- $name -}} +{{- end -}} + +{{- define "seleniumGrid.video.volumeMounts.default" -}} +- name: {{ include "seleniumGrid.video.volume.name.scripts" . }} + mountPath: /opt/bin/video.sh + subPath: video.sh +- name: {{ include "seleniumGrid.video.volume.name.folder" . }} + mountPath: /videos +{{- end -}} + +{{- define "seleniumGrid.video.volumes.default" -}} +- name: {{ include "seleniumGrid.video.volume.name.scripts" . }} + configMap: + name: {{ template "seleniumGrid.video.fullname" . }} + defaultMode: 0500 +- name: {{ include "seleniumGrid.video.volume.name.folder" . }} + emptyDir: {} +{{- end -}} + +{{- define "seleniumGrid.video.uploader.volumeMounts.default" -}} +- name: {{ include "seleniumGrid.video.volume.name.folder" . }} + mountPath: /videos +{{- end -}} + +{{/* Combine videoRecorder.extraVolumeMounts with the default ones for container video recorder */}} +{{- define "seleniumGrid.video.volumeMounts" -}} +{{- $videoVolumeMounts := list -}} +{{- if .Values.videoRecorder.extraVolumeMounts -}} + {{- range .Values.videoRecorder.extraVolumeMounts -}} + {{- $videoVolumeMounts = append $videoVolumeMounts . -}} + {{- end -}} +{{- end -}} +{{- $defaultVolumeMounts := (include "seleniumGrid.video.volumeMounts.default" . | toString | fromYamlArray ) -}} +{{- $videoVolumeMounts = include "utils.appendDefaultIfNotExist" (dict "currentArray" $videoVolumeMounts "defaultArray" $defaultVolumeMounts "uniqueKey" "mountPath") -}} +{{- not (empty $videoVolumeMounts) | ternary $videoVolumeMounts "" -}} +{{- end -}} + +{{/* Combine videoRecorder.uploader.extraVolumeMounts with the default ones for container video uploader */}} +{{- define "seleniumGrid.video.uploader.volumeMounts" -}} +{{- $videoUploaderVolumeMounts := list -}} +{{- if .uploader.extraVolumeMounts -}} + {{- range .uploader.extraVolumeMounts -}} + {{- $videoUploaderVolumeMounts = append $videoUploaderVolumeMounts . -}} + {{- end -}} +{{- end }} +{{- $defaultVolumeMounts := (include "seleniumGrid.video.uploader.volumeMounts.default" . | toString | fromYamlArray ) -}} +{{- $videoUploaderVolumeMounts = include "utils.appendDefaultIfNotExist" (dict "currentArray" $videoUploaderVolumeMounts "defaultArray" $defaultVolumeMounts "uniqueKey" "mountPath") -}} +{{- not (empty $videoUploaderVolumeMounts) | ternary $videoUploaderVolumeMounts "" -}} +{{- end -}} + +{{/* Combine videoRecorder.extraVolumes with the default ones for the node pod */}} +{{- define "seleniumGrid.video.volumes" -}} +{{- $videoVolumes := list -}} +{{- if .Values.videoRecorder.extraVolumes -}} + {{- range .Values.videoRecorder.extraVolumes -}} + {{- $videoVolumes = append $videoVolumes . -}} + {{- end -}} +{{- end -}} +{{- $defaultVolumes := (include "seleniumGrid.video.volumes.default" . | toString | fromYamlArray ) -}} +{{- $videoVolumes = include "utils.appendDefaultIfNotExist" (dict "currentArray" $videoVolumes "defaultArray" $defaultVolumes "uniqueKey" "name") -}} +{{- not (empty $videoVolumes) | ternary $videoVolumes "" -}} +{{- end -}} + +{{/* +Is used to append default items needed to an array if they are not already present. Args: currentArray, defaultArray, uniqueKey +Usage: {{- $thisArray = include "utils.appendDefaultIfNotExist" (dict "currentArray" $thisArray "defaultArray" $defaultArray "uniqueKey" $uniqueKey }} +*/}} +{{- define "utils.appendDefaultIfNotExist" -}} + {{- $currentArray := index . "currentArray" -}} + {{- $defaultArray := index . "defaultArray" -}} + {{- $uniqueKey := index . "uniqueKey" -}} + {{- range $default := $defaultArray -}} + {{- if eq (len $currentArray) 0 -}} + {{- $currentArray = append $currentArray $default -}} + {{- end -}} + {{- $isExisting := false -}} + {{- range $current := $currentArray -}} + {{- if eq (index $default $uniqueKey | toString) (index $current $uniqueKey | toString) -}} + {{- $isExisting = true -}} + {{- end -}} + {{- end -}} + {{- if not $isExisting -}} + {{- $currentArray = append $currentArray $default -}} + {{- end -}} + {{- end -}} + {{- $currentArray | toYaml -}} +{{- end -}} diff --git a/charts/selenium-grid/templates/chrome-node-deployment.yaml b/charts/selenium-grid/templates/chrome-node-deployment.yaml index 0b3d2a9b5..e3bf3f1d2 100644 --- a/charts/selenium-grid/templates/chrome-node-deployment.yaml +++ b/charts/selenium-grid/templates/chrome-node-deployment.yaml @@ -5,8 +5,8 @@ metadata: name: {{ template "seleniumGrid.chromeNode.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: selenium-chrome-node - app.kubernetes.io/name: selenium-chrome-node + app: {{ template "seleniumGrid.chromeNode.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.chromeNode.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.chromeNode.labels }} {{- toYaml . | nindent 4 }} @@ -20,10 +20,11 @@ spec: {{end}} selector: matchLabels: - app: selenium-chrome-node + app: {{ template "seleniumGrid.chromeNode.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- $podScope := deepCopy . -}} -{{- $_ := set $podScope "name" "selenium-chrome-node" -}} -{{- $_ = set $podScope "node" .Values.chromeNode -}} +{{- $_ := set $podScope "name" (include "seleniumGrid.chromeNode.fullname" .) -}} +{{- $_ = set $podScope "node" .Values.chromeNode -}} +{{- $_ = set $podScope "uploader" (get .Values.videoRecorder (.Values.videoRecorder.uploader | toString)) -}} {{- include "seleniumGrid.podTemplate" $podScope | nindent 2 }} {{- end }} diff --git a/charts/selenium-grid/templates/chrome-node-hpa.yaml b/charts/selenium-grid/templates/chrome-node-hpa.yaml index 7cb78043c..74c588198 100644 --- a/charts/selenium-grid/templates/chrome-node-hpa.yaml +++ b/charts/selenium-grid/templates/chrome-node-hpa.yaml @@ -11,13 +11,8 @@ metadata: labels: deploymentName: {{ template "seleniumGrid.chromeNode.fullname" . }} spec: - maxReplicaCount: {{ .Values.chromeNode.maxReplicaCount }} - minReplicaCount: {{ .Values.chromeNode.minReplicaCount }} - scaleTargetRef: - name: {{ template "seleniumGrid.chromeNode.fullname" . }} - triggers: - - type: selenium-grid - {{- with .Values.chromeNode.hpa }} - metadata: {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} + {{- $podScope := deepCopy . -}} + {{- $_ := set $podScope "name" (include "seleniumGrid.chromeNode.fullname" .) -}} + {{- $_ = set $podScope "node" .Values.chromeNode -}} + {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} {{- end }} diff --git a/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml b/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml index 4971aec74..0b0d34443 100644 --- a/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml +++ b/charts/selenium-grid/templates/chrome-node-scaledjobs.yaml @@ -9,8 +9,8 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} labels: - app: selenium-chrome-node - app.kubernetes.io/name: selenium-chrome-node + app: {{ template "seleniumGrid.chromeNode.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.chromeNode.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.chromeNode.labels }} {{- toYaml . | nindent 4 }} @@ -19,21 +19,10 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - maxReplicaCount: {{ .Values.chromeNode.maxReplicaCount }} - {{- with .Values.autoscaling.scaledJobOptions -}} - {{ toYaml . | nindent 2 }} - {{- end }} - triggers: - - type: selenium-grid - {{- with .Values.chromeNode.hpa }} - metadata: {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - jobTargetRef: - parallelism: 1 - completions: 1 - backoffLimit: 0 -{{- $podScope := deepCopy . -}} -{{- $_ := set $podScope "name" "selenium-chrome-node" -}} -{{- $_ = set $podScope "node" .Values.chromeNode -}} -{{- include "seleniumGrid.podTemplate" $podScope | nindent 4 }} + {{- $podScope := deepCopy . -}} + {{- $_ := set $podScope "name" (include "seleniumGrid.chromeNode.fullname" .) -}} + {{- $_ = set $podScope "node" .Values.chromeNode -}} + {{- $_ = set $podScope "uploader" (get .Values.videoRecorder (.Values.videoRecorder.uploader | toString)) -}} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} + {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} {{- end }} diff --git a/charts/selenium-grid/templates/chrome-node-service.yaml b/charts/selenium-grid/templates/chrome-node-service.yaml index 41aebd570..efe8f1873 100644 --- a/charts/selenium-grid/templates/chrome-node-service.yaml +++ b/charts/selenium-grid/templates/chrome-node-service.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "seleniumGrid.chromeNode.fullname" . }} namespace: {{ .Release.Namespace }} labels: - name: selenium-chrome-node + name: {{ template "seleniumGrid.chromeNode.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.chromeNode.service.annotations }} annotations: @@ -14,11 +14,27 @@ metadata: spec: type: {{ .Values.chromeNode.service.type }} selector: - app: selenium-chrome-node + app: {{ template "seleniumGrid.chromeNode.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} + {{- if and (eq .Values.chromeNode.service.type "LoadBalancer") (.Values.chromeNode.service.loadBalancerIP) }} + loadBalancerIP: {{ .Values.chromeNode.service.loadBalancerIP }} + {{- end }} ports: - name: tcp-chrome protocol: TCP port: {{ .Values.chromeNode.seleniumServicePort }} targetPort: {{ .Values.chromeNode.seleniumPort }} + {{- with .Values.chromeNode.service.ports }} + {{- range . }} + - name: {{ .name }} + port: {{ .port }} + targetPort: {{ .targetPort }} + {{- if .protocol }} + protocol: {{ .protocol }} + {{- end }} + {{- if and (eq $.Values.chromeNode.service.type "NodePort") .nodePort }} + nodePort: {{ .nodePort }} + {{- end }} + {{- end }} + {{- end }} {{- end }} diff --git a/charts/selenium-grid/templates/distributor-deployment.yaml b/charts/selenium-grid/templates/distributor-deployment.yaml index bf35d43ed..fe5efd767 100644 --- a/charts/selenium-grid/templates/distributor-deployment.yaml +++ b/charts/selenium-grid/templates/distributor-deployment.yaml @@ -5,8 +5,8 @@ metadata: name: {{ template "seleniumGrid.distributor.fullname" . }} namespace: {{ .Release.Namespace }} labels: &distributor_labels - app: selenium-distributor - app.kubernetes.io/name: selenium-distributor + app: {{ template "seleniumGrid.distributor.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.distributor.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ spec: replicas: 1 selector: matchLabels: - app: selenium-distributor + app: {{ template "seleniumGrid.distributor.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: @@ -27,7 +27,7 @@ spec: serviceAccountName: {{ template "seleniumGrid.serviceAccount.fullname" . }} serviceAccount: {{ template "seleniumGrid.serviceAccount.fullname" . }} containers: - - name: selenium-distributor + - name: {{ template "seleniumGrid.distributor.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.distributor.imageTag }} image: {{ printf "%s:%s" .Values.components.distributor.imageName $imageTag }} imagePullPolicy: {{ .Values.components.distributor.imagePullPolicy }} diff --git a/charts/selenium-grid/templates/distributor-service.yaml b/charts/selenium-grid/templates/distributor-service.yaml index 067be8952..295407fac 100644 --- a/charts/selenium-grid/templates/distributor-service.yaml +++ b/charts/selenium-grid/templates/distributor-service.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "seleniumGrid.distributor.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: selenium-distributor + app: {{ template "seleniumGrid.distributor.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ metadata: {{- end }} spec: selector: - app: selenium-distributor + app: {{ template "seleniumGrid.distributor.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} type: {{ .Values.components.distributor.serviceType }} ports: diff --git a/charts/selenium-grid/templates/edge-node-deployment.yaml b/charts/selenium-grid/templates/edge-node-deployment.yaml index 883a45a76..9802239e8 100644 --- a/charts/selenium-grid/templates/edge-node-deployment.yaml +++ b/charts/selenium-grid/templates/edge-node-deployment.yaml @@ -5,8 +5,8 @@ metadata: name: {{ template "seleniumGrid.edgeNode.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: selenium-edge-node - app.kubernetes.io/name: selenium-edge-node + app: {{ template "seleniumGrid.edgeNode.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.edgeNode.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.edgeNode.labels }} {{- toYaml . | nindent 4 }} @@ -20,10 +20,11 @@ spec: {{end}} selector: matchLabels: - app: selenium-edge-node + app: {{ template "seleniumGrid.edgeNode.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- $podScope := deepCopy . -}} -{{- $_ := set $podScope "name" "selenium-edge-node" -}} -{{- $_ = set $podScope "node" .Values.edgeNode -}} +{{- $_ := set $podScope "name" (include "seleniumGrid.edgeNode.fullname" .) -}} +{{- $_ = set $podScope "node" .Values.edgeNode -}} +{{- $_ = set $podScope "uploader" (get .Values.videoRecorder (.Values.videoRecorder.uploader | toString)) -}} {{- include "seleniumGrid.podTemplate" $podScope | nindent 2 }} {{- end }} diff --git a/charts/selenium-grid/templates/edge-node-hpa.yaml b/charts/selenium-grid/templates/edge-node-hpa.yaml index b115de353..0839a3bdd 100644 --- a/charts/selenium-grid/templates/edge-node-hpa.yaml +++ b/charts/selenium-grid/templates/edge-node-hpa.yaml @@ -11,13 +11,8 @@ metadata: labels: deploymentName: {{ template "seleniumGrid.edgeNode.fullname" . }} spec: - maxReplicaCount: {{ .Values.edgeNode.maxReplicaCount }} - minReplicaCount: {{ .Values.edgeNode.minReplicaCount }} - scaleTargetRef: - name: {{ template "seleniumGrid.edgeNode.fullname" . }} - triggers: - - type: selenium-grid - {{- with .Values.edgeNode.hpa }} - metadata: {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} + {{- $podScope := deepCopy . -}} + {{- $_ := set $podScope "name" (include "seleniumGrid.edgeNode.fullname" .) -}} + {{- $_ = set $podScope "node" .Values.edgeNode -}} + {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} {{- end }} diff --git a/charts/selenium-grid/templates/edge-node-scaledjob.yaml b/charts/selenium-grid/templates/edge-node-scaledjob.yaml index 6d113d186..132792c79 100644 --- a/charts/selenium-grid/templates/edge-node-scaledjob.yaml +++ b/charts/selenium-grid/templates/edge-node-scaledjob.yaml @@ -9,8 +9,8 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} labels: - app: selenium-edge-node - app.kubernetes.io/name: selenium-edge-node + app: {{ template "seleniumGrid.edgeNode.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.edgeNode.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.edgeNode.labels }} {{- toYaml . | nindent 4 }} @@ -19,21 +19,10 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - maxReplicaCount: {{ .Values.edgeNode.maxReplicaCount }} - {{- with .Values.autoscaling.scaledJobOptions -}} - {{ toYaml . | nindent 2 }} - {{- end }} - triggers: - - type: selenium-grid - {{- with .Values.edgeNode.hpa }} - metadata: {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - jobTargetRef: - parallelism: 1 - completions: 1 - backoffLimit: 0 -{{- $podScope := deepCopy . -}} -{{- $_ := set $podScope "name" "selenium-edge-node" -}} -{{- $_ = set $podScope "node" .Values.edgeNode -}} -{{- include "seleniumGrid.podTemplate" $podScope | nindent 4 }} + {{- $podScope := deepCopy . -}} + {{- $_ := set $podScope "name" (include "seleniumGrid.edgeNode.fullname" .) -}} + {{- $_ = set $podScope "node" .Values.edgeNode -}} + {{- $_ = set $podScope "uploader" (get .Values.videoRecorder (.Values.videoRecorder.uploader | toString)) -}} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} + {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} {{- end }} diff --git a/charts/selenium-grid/templates/edge-node-service.yaml b/charts/selenium-grid/templates/edge-node-service.yaml index ae59a4a63..d54dd70a3 100644 --- a/charts/selenium-grid/templates/edge-node-service.yaml +++ b/charts/selenium-grid/templates/edge-node-service.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "seleniumGrid.edgeNode.fullname" . }} namespace: {{ .Release.Namespace }} labels: - name: selenium-edge-node + name: {{ template "seleniumGrid.edgeNode.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.edgeNode.service.annotations }} annotations: @@ -14,11 +14,27 @@ metadata: spec: type: {{ .Values.edgeNode.service.type }} selector: - app: selenium-edge-node + app: {{ template "seleniumGrid.edgeNode.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} + {{- if and (eq .Values.edgeNode.service.type "LoadBalancer") (.Values.edgeNode.service.loadBalancerIP) }} + loadBalancerIP: {{ .Values.edgeNode.service.loadBalancerIP }} + {{- end }} ports: - name: tcp-edge protocol: TCP port: {{ .Values.edgeNode.seleniumServicePort }} targetPort: {{ .Values.edgeNode.seleniumPort }} + {{- with .Values.edgeNode.service.ports }} + {{- range . }} + - name: {{ .name }} + port: {{ .port }} + targetPort: {{ .targetPort }} + {{- if .protocol }} + protocol: {{ .protocol }} + {{- end }} + {{- if and (eq $.Values.edgeNode.service.type "NodePort") .nodePort }} + nodePort: {{ .nodePort }} + {{- end }} + {{- end }} + {{- end }} {{- end }} diff --git a/charts/selenium-grid/templates/event-bus-configmap.yaml b/charts/selenium-grid/templates/event-bus-configmap.yaml index efe33fa7d..05f279bba 100644 --- a/charts/selenium-grid/templates/event-bus-configmap.yaml +++ b/charts/selenium-grid/templates/event-bus-configmap.yaml @@ -15,6 +15,6 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} data: - SE_EVENT_BUS_HOST: {{ $eventBusHost }} + SE_EVENT_BUS_HOST: {{ $eventBusHost | quote }} SE_EVENT_BUS_PUBLISH_PORT: {{ $eventBusPublishPort | quote }} SE_EVENT_BUS_SUBSCRIBE_PORT: {{ $eventBusSubscribePort | quote }} diff --git a/charts/selenium-grid/templates/event-bus-deployment.yaml b/charts/selenium-grid/templates/event-bus-deployment.yaml index 498921e8c..a315cd820 100644 --- a/charts/selenium-grid/templates/event-bus-deployment.yaml +++ b/charts/selenium-grid/templates/event-bus-deployment.yaml @@ -5,8 +5,8 @@ metadata: name: {{ template "seleniumGrid.eventBus.fullname" . }} namespace: {{ .Release.Namespace }} labels: &event_bus_labels - app: selenium-event-bus - app.kubernetes.io/name: selenium-event-bus + app: {{ template "seleniumGrid.eventBus.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.eventBus.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ spec: replicas: 1 selector: matchLabels: - app: selenium-event-bus + app: {{ template "seleniumGrid.eventBus.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: @@ -27,7 +27,7 @@ spec: serviceAccountName: {{ template "seleniumGrid.serviceAccount.fullname" . }} serviceAccount: {{ template "seleniumGrid.serviceAccount.fullname" . }} containers: - - name: selenium-event-bus + - name: {{ template "seleniumGrid.eventBus.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.eventBus.imageTag }} image: {{ printf "%s:%s" .Values.components.eventBus.imageName $imageTag }} imagePullPolicy: {{ .Values.components.eventBus.imagePullPolicy }} diff --git a/charts/selenium-grid/templates/event-bus-service.yaml b/charts/selenium-grid/templates/event-bus-service.yaml index 38ff6cd1e..c3a30bcc0 100644 --- a/charts/selenium-grid/templates/event-bus-service.yaml +++ b/charts/selenium-grid/templates/event-bus-service.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "seleniumGrid.eventBus.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: selenium-event-bus + app: {{ template "seleniumGrid.eventBus.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ metadata: {{- end }} spec: selector: - app: selenium-event-bus + app: {{ template "seleniumGrid.eventBus.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} type: {{ .Values.components.eventBus.serviceType }} ports: diff --git a/charts/selenium-grid/templates/firefox-node-deployment.yaml b/charts/selenium-grid/templates/firefox-node-deployment.yaml index d0b250470..5a1e96b55 100644 --- a/charts/selenium-grid/templates/firefox-node-deployment.yaml +++ b/charts/selenium-grid/templates/firefox-node-deployment.yaml @@ -5,8 +5,8 @@ metadata: name: {{ template "seleniumGrid.firefoxNode.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: selenium-firefox-node - app.kubernetes.io/name: selenium-firefox-node + app: {{ template "seleniumGrid.firefoxNode.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.firefoxNode.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.firefoxNode.labels }} {{- toYaml . | nindent 4 }} @@ -20,10 +20,11 @@ spec: {{end}} selector: matchLabels: - app: selenium-firefox-node + app: {{ template "seleniumGrid.firefoxNode.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- $podScope := deepCopy . -}} -{{- $_ := set $podScope "name" "selenium-firefox-node" -}} -{{- $_ = set $podScope "node" .Values.firefoxNode -}} +{{- $_ := set $podScope "name" (include "seleniumGrid.firefoxNode.fullname" .) -}} +{{- $_ = set $podScope "node" .Values.firefoxNode -}} +{{- $_ = set $podScope "uploader" (get .Values.videoRecorder (.Values.videoRecorder.uploader | toString)) -}} {{- include "seleniumGrid.podTemplate" $podScope | nindent 2 }} {{- end }} diff --git a/charts/selenium-grid/templates/firefox-node-hpa.yaml b/charts/selenium-grid/templates/firefox-node-hpa.yaml index 70a463e79..ad18269a5 100644 --- a/charts/selenium-grid/templates/firefox-node-hpa.yaml +++ b/charts/selenium-grid/templates/firefox-node-hpa.yaml @@ -11,13 +11,8 @@ metadata: labels: deploymentName: {{ template "seleniumGrid.firefoxNode.fullname" . }} spec: - maxReplicaCount: {{ .Values.firefoxNode.maxReplicaCount }} - minReplicaCount: {{ .Values.firefoxNode.minReplicaCount }} - scaleTargetRef: - name: {{ template "seleniumGrid.firefoxNode.fullname" . }} - triggers: - - type: selenium-grid - {{- with .Values.firefoxNode.hpa }} - metadata: {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} + {{- $podScope := deepCopy . -}} + {{- $_ := set $podScope "name" (include "seleniumGrid.firefoxNode.fullname" .) -}} + {{- $_ = set $podScope "node" .Values.firefoxNode -}} + {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} {{- end }} diff --git a/charts/selenium-grid/templates/firefox-node-scaledjob.yaml b/charts/selenium-grid/templates/firefox-node-scaledjob.yaml index de90024c7..e7992c1fc 100644 --- a/charts/selenium-grid/templates/firefox-node-scaledjob.yaml +++ b/charts/selenium-grid/templates/firefox-node-scaledjob.yaml @@ -9,8 +9,8 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} labels: - app: selenium-firefox-node - app.kubernetes.io/name: selenium-firefox-node + app: {{ template "seleniumGrid.firefoxNode.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.firefoxNode.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.firefoxNode.labels }} {{- toYaml . | nindent 4 }} @@ -19,21 +19,10 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - maxReplicaCount: {{ .Values.firefoxNode.maxReplicaCount }} - {{- with .Values.autoscaling.scaledJobOptions -}} - {{ toYaml . | nindent 2 }} - {{- end }} - triggers: - - type: selenium-grid - {{- with .Values.firefoxNode.hpa }} - metadata: {{- tpl (toYaml .) $ | nindent 8 }} - {{- end }} - jobTargetRef: - parallelism: 1 - completions: 1 - backoffLimit: 0 -{{- $podScope := deepCopy . -}} -{{- $_ := set $podScope "name" "selenium-firefox-node" -}} -{{- $_ = set $podScope "node" .Values.firefoxNode -}} -{{- include "seleniumGrid.podTemplate" $podScope | nindent 4 }} + {{- $podScope := deepCopy . -}} + {{- $_ := set $podScope "name" (include "seleniumGrid.firefoxNode.fullname" .) -}} + {{- $_ = set $podScope "node" .Values.firefoxNode -}} + {{- $_ = set $podScope "uploader" (get .Values.videoRecorder (.Values.videoRecorder.uploader | toString)) -}} + {{- $_ = set $podScope "podTemplate" (include "seleniumGrid.podTemplate" $podScope | fromYaml) }} + {{- include "seleniumGrid.autoscalingTemplate" $podScope | nindent 2 }} {{- end }} diff --git a/charts/selenium-grid/templates/firefox-node-service.yaml b/charts/selenium-grid/templates/firefox-node-service.yaml index 473225f93..43ba40380 100644 --- a/charts/selenium-grid/templates/firefox-node-service.yaml +++ b/charts/selenium-grid/templates/firefox-node-service.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "seleniumGrid.firefoxNode.fullname" . }} namespace: {{ .Release.Namespace }} labels: - name: selenium-firefox-node + name: {{ template "seleniumGrid.firefoxNode.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.firefoxNode.service.annotations }} annotations: @@ -14,11 +14,27 @@ metadata: spec: type: {{ .Values.firefoxNode.service.type }} selector: - app: selenium-firefox-node + app: {{ template "seleniumGrid.firefoxNode.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} + {{- if and (eq .Values.firefoxNode.service.type "LoadBalancer") (.Values.firefoxNode.service.loadBalancerIP) }} + loadBalancerIP: {{ .Values.firefoxNode.service.loadBalancerIP }} + {{- end }} ports: - name: tcp-firefox protocol: TCP port: {{ .Values.firefoxNode.seleniumServicePort }} targetPort: {{ .Values.firefoxNode.seleniumPort }} + {{- with .Values.firefoxNode.service.ports }} + {{- range . }} + - name: {{ .name }} + port: {{ .port }} + targetPort: {{ .targetPort }} + {{- if .protocol }} + protocol: {{ .protocol }} + {{- end }} + {{- if and (eq $.Values.firefoxNode.service.type "NodePort") .nodePort }} + nodePort: {{ .nodePort }} + {{- end }} + {{- end }} + {{- end }} {{- end }} diff --git a/charts/selenium-grid/templates/hub-deployment.yaml b/charts/selenium-grid/templates/hub-deployment.yaml index 6f9488d12..a5ea71ab5 100644 --- a/charts/selenium-grid/templates/hub-deployment.yaml +++ b/charts/selenium-grid/templates/hub-deployment.yaml @@ -5,8 +5,8 @@ metadata: name: {{ template "seleniumGrid.hub.fullname" . }} namespace: {{ .Release.Namespace }} labels: &hub_labels - app: selenium-hub - app.kubernetes.io/name: selenium-hub + app: {{ template "seleniumGrid.hub.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.hub.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.hub.labels }} {{- toYaml . | nindent 4 }} @@ -18,7 +18,7 @@ spec: replicas: 1 selector: matchLabels: - app: selenium-hub + app: {{ template "seleniumGrid.hub.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: @@ -30,7 +30,7 @@ spec: serviceAccountName: {{ template "seleniumGrid.serviceAccount.fullname" . }} serviceAccount: {{ template "seleniumGrid.serviceAccount.fullname" . }} containers: - - name: selenium-hub + - name: {{ template "seleniumGrid.hub.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.hub.imageTag }} image: {{ printf "%s:%s" .Values.hub.imageName $imageTag }} imagePullPolicy: {{ .Values.hub.imagePullPolicy }} diff --git a/charts/selenium-grid/templates/hub-service.yaml b/charts/selenium-grid/templates/hub-service.yaml index 417e9849f..aa4daa34c 100644 --- a/charts/selenium-grid/templates/hub-service.yaml +++ b/charts/selenium-grid/templates/hub-service.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "seleniumGrid.hub.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: selenium-hub + app: {{ template "seleniumGrid.hub.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ metadata: {{- end }} spec: selector: - app: selenium-hub + app: {{ template "seleniumGrid.hub.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} type: {{ .Values.hub.serviceType }} {{- if and (eq .Values.hub.serviceType "LoadBalancer") ( .Values.hub.loadBalancerIP ) }} diff --git a/charts/selenium-grid/templates/ingress.yaml b/charts/selenium-grid/templates/ingress.yaml index 6df2c9553..f574c6c2f 100644 --- a/charts/selenium-grid/templates/ingress.yaml +++ b/charts/selenium-grid/templates/ingress.yaml @@ -14,6 +14,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ template "seleniumGrid.ingress.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} @@ -46,8 +47,9 @@ spec: {{- end }} {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.Version }} paths: + {{- if empty (.Values.ingress.paths) }} - path: {{ $.Values.ingress.path | default "/" }} - pathType: Prefix + pathType: {{ $.Values.ingress.pathType | default "Prefix" }} backend: service: {{- if $.Values.isolateComponents }} @@ -59,6 +61,9 @@ spec: port: number: {{ $.Values.hub.port }} {{- end }} + {{- else }} + {{- tpl (toYaml .Values.ingress.paths | nindent 10) . }} + {{- end }} {{- else }} paths: - path: / diff --git a/charts/selenium-grid/templates/router-deployment.yaml b/charts/selenium-grid/templates/router-deployment.yaml index 037bcbf39..05ae9a7b9 100644 --- a/charts/selenium-grid/templates/router-deployment.yaml +++ b/charts/selenium-grid/templates/router-deployment.yaml @@ -5,8 +5,8 @@ metadata: name: {{ template "seleniumGrid.router.fullname" . }} namespace: {{ .Release.Namespace }} labels: &router_labels - app: selenium-router - app.kubernetes.io/name: selenium-router + app: {{ template "seleniumGrid.router.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.router.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ spec: replicas: 1 selector: matchLabels: - app: selenium-router + app: {{ template "seleniumGrid.router.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: @@ -27,7 +27,7 @@ spec: serviceAccountName: {{ template "seleniumGrid.serviceAccount.fullname" . }} serviceAccount: {{ template "seleniumGrid.serviceAccount.fullname" . }} containers: - - name: selenium-router + - name: {{ template "seleniumGrid.router.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.router.imageTag }} image: {{ printf "%s:%s" .Values.components.router.imageName $imageTag }} imagePullPolicy: {{ .Values.components.router.imagePullPolicy }} diff --git a/charts/selenium-grid/templates/router-service.yaml b/charts/selenium-grid/templates/router-service.yaml index d586c31fe..9eaff7955 100644 --- a/charts/selenium-grid/templates/router-service.yaml +++ b/charts/selenium-grid/templates/router-service.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "seleniumGrid.router.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: selenium-router + app: {{ template "seleniumGrid.router.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ metadata: {{- end }} spec: selector: - app: selenium-router + app: {{ template "seleniumGrid.router.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} type: {{ .Values.components.router.serviceType }} {{- if and (eq .Values.components.router.serviceType "LoadBalancer") (.Values.components.router.loadBalancerIP) }} diff --git a/charts/selenium-grid/templates/session-map-deployment.yaml b/charts/selenium-grid/templates/session-map-deployment.yaml index 437c664e2..496089eaf 100644 --- a/charts/selenium-grid/templates/session-map-deployment.yaml +++ b/charts/selenium-grid/templates/session-map-deployment.yaml @@ -5,8 +5,8 @@ metadata: name: {{ template "seleniumGrid.sessionMap.fullname" . }} namespace: {{ .Release.Namespace }} labels: &session_map_labels - app: selenium-session-map - app.kubernetes.io/name: selenium-session-map + app: {{ template "seleniumGrid.sessionMap.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.sessionMap.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ spec: replicas: 1 selector: matchLabels: - app: selenium-session-map + app: {{ template "seleniumGrid.sessionMap.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: @@ -27,7 +27,7 @@ spec: serviceAccountName: {{ template "seleniumGrid.serviceAccount.fullname" . }} serviceAccount: {{ template "seleniumGrid.serviceAccount.fullname" . }} containers: - - name: selenium-session-map + - name: {{ template "seleniumGrid.sessionMap.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.sessionMap.imageTag }} image: {{ printf "%s:%s" .Values.components.sessionMap.imageName $imageTag }} imagePullPolicy: {{ .Values.components.sessionMap.imagePullPolicy }} diff --git a/charts/selenium-grid/templates/session-map-service.yaml b/charts/selenium-grid/templates/session-map-service.yaml index 6df2d9bbf..13dd963b6 100644 --- a/charts/selenium-grid/templates/session-map-service.yaml +++ b/charts/selenium-grid/templates/session-map-service.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "seleniumGrid.sessionMap.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: selenium-session-map + app: {{ template "seleniumGrid.sessionMap.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ metadata: {{- end }} spec: selector: - app: selenium-session-map + app: {{ template "seleniumGrid.sessionMap.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} type: {{ .Values.components.sessionMap.serviceType }} ports: diff --git a/charts/selenium-grid/templates/session-queuer-deployment.yaml b/charts/selenium-grid/templates/session-queuer-deployment.yaml index 0f26f06e5..28c17b49c 100644 --- a/charts/selenium-grid/templates/session-queuer-deployment.yaml +++ b/charts/selenium-grid/templates/session-queuer-deployment.yaml @@ -5,8 +5,8 @@ metadata: name: {{ template "seleniumGrid.sessionQueue.fullname" . }} namespace: {{ .Release.Namespace }} labels: &session_queue_labels - app: selenium-session-queue - app.kubernetes.io/name: selenium-session-queue + app: {{ template "seleniumGrid.sessionQueue.fullname" . }} + app.kubernetes.io/name: {{ template "seleniumGrid.sessionQueue.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ spec: replicas: 1 selector: matchLabels: - app: selenium-session-queue + app: {{ template "seleniumGrid.sessionQueue.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: @@ -27,7 +27,7 @@ spec: serviceAccountName: {{ template "seleniumGrid.serviceAccount.fullname" . }} serviceAccount: {{ template "seleniumGrid.serviceAccount.fullname" . }} containers: - - name: selenium-session-queue + - name: {{ template "seleniumGrid.sessionQueue.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.sessionQueue.imageTag }} image: {{ printf "%s:%s" .Values.components.sessionQueue.imageName $imageTag }} imagePullPolicy: {{ .Values.components.sessionQueue.imagePullPolicy }} diff --git a/charts/selenium-grid/templates/session-queuer-service.yaml b/charts/selenium-grid/templates/session-queuer-service.yaml index be3739ad0..54e535f7b 100644 --- a/charts/selenium-grid/templates/session-queuer-service.yaml +++ b/charts/selenium-grid/templates/session-queuer-service.yaml @@ -5,7 +5,7 @@ metadata: name: {{ template "seleniumGrid.sessionQueue.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: selenium-session-queue + app: {{ template "seleniumGrid.sessionQueue.fullname" . }} {{- include "seleniumGrid.commonLabels" . | nindent 4 }} {{- with .Values.customLabels }} {{- toYaml . | nindent 4 }} @@ -15,7 +15,7 @@ metadata: {{- end }} spec: selector: - app: selenium-session-queue + app: {{ template "seleniumGrid.sessionQueue.fullname" . }} app.kubernetes.io/instance: {{ .Release.Name }} type: {{ .Values.components.sessionQueue.serviceType }} ports: diff --git a/charts/selenium-grid/templates/video-cm.yaml b/charts/selenium-grid/templates/video-cm.yaml new file mode 100644 index 000000000..1b49e026e --- /dev/null +++ b/charts/selenium-grid/templates/video-cm.yaml @@ -0,0 +1,98 @@ +{{- if .Values.videoRecorder.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "seleniumGrid.video.fullname" . }} +data: + video.sh: | + #!/usr/bin/env bash + set -em + function finish { + echo exit > /videos/uploadpipe + kill -s SIGINT `cat /var/run/supervisor/supervisord.pid` + } + trap finish EXIT + FRAME_RATE=${FRAME_RATE:-$SE_FRAME_RATE} + CODEC=${CODEC:-$SE_CODEC} + PRESET=${PRESET:-$SE_PRESET} + export DISPLAY=localhost:${DISPLAY_NUM}.0 + + return_code=1 + max_attempts=600 + attempts=0 + if [ ! -p /videos/uploadpipe ]; + then + mkfifo /videos/uploadpipe + fi + if [[ "$UPLOAD_DESTINATION_PREFIX" = "" ]] + then + echo Upload destination not known since UPLOAD_DESTINATION_PREFIX is not set. Exiting video recorder. + exit + fi + echo Checking if the display is open + until xset b off || [[ $attempts = $max_attempts ]] + do + echo Waiting before next display check + sleep 0.5 + attempts=$((attempts+1)) + done + if [[ $attempts = $max_attempts ]] + then + echo Can not open display, exiting. + exit + fi + VIDEO_SIZE=$(xdpyinfo | grep 'dimensions:' | awk '{print $2}') + + recording_started="false" + video_file_name="" + video_file="" + prev_session_id="" + attempts=0 + echo Checking if node API responds + until curl -s --request GET http://localhost:5555/status || [[ $attempts = $max_attempts ]] + do + echo Waiting before next API check + sleep 0.5 + attempts=$((attempts+1)) + done + if [[ $attempts = $max_attempts ]] + then + echo Can not reach node API, exiting. + exit + fi + while curl -s --request GET http://localhost:5555/status > /tmp/status.json + do + session_id=$(jq -r '.[]?.node?.slots | .[0]?.session?.sessionId' /tmp/status.json) + echo $session_id + if [[ "$session_id" != "null" && "$session_id" != "" && "$recording_started" = "false" ]] + then + video_file_name="$session_id.mp4" + video_file="${SE_VIDEO_FOLDER:-/videos}/$video_file_name" + echo "Starting to record video" + ffmpeg -nostdin -y -f x11grab -video_size ${VIDEO_SIZE} -r ${FRAME_RATE} -i ${DISPLAY} -codec:v ${CODEC} ${PRESET} -pix_fmt yuv420p $video_file & + recording_started="true" + echo "Video recording started" + elif [[ "$session_id" != "$prev_session_id" && "$recording_started" = "true" ]] + then + echo "Stopping to record video" + kill -INT %1 + fg || echo ffmpeg exited with code $? + if [[ "$UPLOAD_DESTINATION_PREFIX" != "false" ]] + then + upload_destination=${UPLOAD_DESTINATION_PREFIX}${video_file_name} + echo "Uploading video to $upload_destination" + echo $video_file $upload_destination > /videos/uploadpipe + fi + recording_started="false" + elif [[ $recording_started = "true" ]] + then + echo "Video recording in progress" + sleep 1 + else + echo "No session in progress" + sleep 1 + fi + prev_session_id=$session_id + done + echo +{{- end }} diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index a29c27865..325d038de 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -1,20 +1,20 @@ global: seleniumGrid: # Image tag for all selenium components - imageTag: 4.12.1-20230920 + imageTag: 4.15.0-20231110 # Image tag for browser's nodes - nodesImageTag: 4.12.1-20230920 + nodesImageTag: 4.15.0-20231110 # Pull secret for all components, can be overridden individually - imagePullSecret: "" + imagePullSecret: "" # Basic auth settings for Selenium Grid basicAuth: - # Enable or disable basic auth - enabled: true - # Username for basic auth - username: admin - # Password for basic auth - password: admin + # Enable or disable basic auth + enabled: true + # Username for basic auth + username: admin + # Password for basic auth + password: admin # Deploy Router, Distributor, EventBus, SessionMap and Nodes separately isolateComponents: false @@ -24,6 +24,7 @@ serviceAccount: create: true name: "" annotations: {} + # eks.amazonaws.com/role-arn: "arn:aws:iam::12345678:role/video-bucket-permissions" # Configure the ingress resource to access the Grid installation. ingress: @@ -34,9 +35,13 @@ ingress: # Custom annotations for ingress resource annotations: {} # Default host for the ingress resource - hostname: selenium-grid.local + hostname: "" # Default host path for the ingress resource path: / + # Default path type for the ingress resource + pathType: Prefix + # List of paths for the ingress resource. This will override the default path + paths: [] # TLS backend configuration for ingress resource tls: [] @@ -61,7 +66,7 @@ components: # Router image name imageName: selenium/router # Router image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.12.1-20230920 + # imageTag: 4.15.0-20231110 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) imagePullPolicy: IfNotPresent @@ -112,7 +117,7 @@ components: # Distributor image name imageName: selenium/distributor # Distributor image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.12.1-20230920 + # imageTag: 4.15.0-20231110 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) imagePullPolicy: IfNotPresent @@ -143,7 +148,7 @@ components: # Event Bus image name imageName: selenium/event-bus # Event Bus image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.12.1-20230920 + # imageTag: 4.15.0-20231110 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) imagePullPolicy: IfNotPresent @@ -178,7 +183,7 @@ components: # Session Map image name imageName: selenium/sessions # Session Map image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.12.1-20230920 + # imageTag: 4.15.0-20231110 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) imagePullPolicy: IfNotPresent @@ -208,7 +213,7 @@ components: # Session Queue image name imageName: selenium/session-queue # Session Queue image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.12.1-20230920 + # imageTag: 4.15.0-20231110 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) imagePullPolicy: IfNotPresent @@ -258,7 +263,7 @@ hub: # Selenium Hub image name imageName: selenium/hub # Selenium Hub image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.12.1-20230920 + # imageTag: 4.15.0-20231110 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) imagePullPolicy: IfNotPresent # Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) @@ -342,16 +347,36 @@ autoscaling: enabled: false # Enable autoscaling without automatically installing KEDA enableWithExistingKEDA: false - # Which typ of KEDA scaling to use: job or deployment + # Which type of KEDA scaling to use: job or deployment scalingType: job # Annotations for KEDA resources: ScaledObject and ScaledJob annotations: helm.sh/hook: post-install,post-upgrade - # Options for KEDA ScaledJobs - scaledJobOptions: + # Options for KEDA scaled resources (keep only common options used for both ScaledJob and ScaledObject) + scaledOptions: + minReplicaCount: 0 + maxReplicaCount: 8 pollingInterval: 10 + # List of triggers. Be careful, the default trigger of selenium-grid will be overwritten if you specify this + # triggers: + # Options for KEDA ScaledJobs (only used when scalingType is set to "job") + # see https://keda.sh/docs/latest/concepts/scaling-jobs/#scaledjob-spec + scaledJobOptions: scalingStrategy: strategy: accurate + # Number of Completed jobs should be kept + successfulJobsHistoryLimit: 0 + # Number of Failed jobs should be kept (for troubleshooting purposes) + failedJobsHistoryLimit: 100 + jobTargetRef: + parallelism: 1 + completions: 1 + backoffLimit: 0 + # Options for KEDA ScaledObjects (only used when scalingType is set to "deployment") + # see https://keda.sh/docs/latest/concepts/scaling-deployments/#scaledobject-spec + scaledObjectOptions: + scaleTargetRef: + kind: Deployment deregisterLifecycle: preStop: exec: @@ -378,7 +403,7 @@ chromeNode: # Image of chrome nodes imageName: selenium/node-chrome # Image of chrome nodes (this overwrites global.seleniumGrid.nodesImageTag) - # imageTag: 4.12.1-20230920 + # imageTag: 4.15.0-20231110 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) imagePullPolicy: IfNotPresent # Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) @@ -439,6 +464,13 @@ chromeNode: enabled: true # Service type type: ClusterIP + # Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) + loadBalancerIP: "" + # Extra ports exposed in node service + ports: + # - name: node-port + # port: 5555 + # targetPort: 5555 # Custom annotations for service annotations: {} # Size limit for DSH volume mounted in container (if not set, default is "1Gi") @@ -471,13 +503,15 @@ chromeNode: # persistentVolumeClaim: # claimName: my-pv-claim - maxReplicaCount: 8 - minReplicaCount: 1 + # Override the scaled options for chrome nodes + # scaledOptions: + # scaledJobOptions: + # scaledObjectOptions: hpa: url: '{{ include "seleniumGrid.graphqlURL" . }}' browserName: chrome # browserVersion: '91.0' # Optional. Only required when supporting multiple versions of browser in your Selenium Grid. - unsafeSsl : 'true' # Optional + unsafeSsl: 'true' # Optional # It is used to add a sidecars proxy in the same pod of the browser node. # It means it will add a new container to the deployment itself. @@ -501,7 +535,7 @@ firefoxNode: # Image of firefox nodes imageName: selenium/node-firefox # Image of firefox nodes (this overwrites global.seleniumGrid.nodesImageTag) - # imageTag: 4.12.1-20230920 + # imageTag: 4.15.0-20231110 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) imagePullPolicy: IfNotPresent # Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) @@ -562,6 +596,13 @@ firefoxNode: enabled: true # Service type type: ClusterIP + # Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) + loadBalancerIP: "" + # Extra ports exposed in node service + ports: + # - name: node-port + # port: 5555 + # targetPort: 5555 # Custom annotations for service annotations: {} # Size limit for DSH volume mounted in container (if not set, default is "1Gi") @@ -593,8 +634,11 @@ firefoxNode: # - name: my-extra-volume-from-pvc # persistentVolumeClaim: # claimName: my-pv-claim - maxReplicaCount: 8 - minReplicaCount: 1 + + # Override the scaled options for firefox nodes + # scaledOptions: + # scaledJobOptions: + # scaledObjectOptions: hpa: url: '{{ include "seleniumGrid.graphqlURL" . }}' browserName: firefox @@ -620,7 +664,7 @@ edgeNode: # Image of edge nodes imageName: selenium/node-edge # Image of edge nodes (this overwrites global.seleniumGrid.nodesImageTag) - # imageTag: 4.12.1-20230920 + # imageTag: 4.15.0-20231110 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) imagePullPolicy: IfNotPresent # Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) @@ -680,9 +724,15 @@ edgeNode: enabled: true # Service type type: ClusterIP + # Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) + loadBalancerIP: "" + # Extra ports exposed in node service + ports: + # - name: node-port + # port: 5555 + # targetPort: 5555 # Custom annotations for service - annotations: - hello: world + annotations: {} # Size limit for DSH volume mounted in container (if not set, default is "1Gi") dshmVolumeSizeLimit: 1Gi # Priority class name for edge-node pods @@ -712,8 +762,11 @@ edgeNode: # - name: my-extra-volume-from-pvc # persistentVolumeClaim: # claimName: my-pv-claim - maxReplicaCount: 8 - minReplicaCount: 1 + + # Override the scaled options for edge nodes + # scaledOptions: + # scaledJobOptions: + # scaledObjectOptions: hpa: url: '{{ include "seleniumGrid.graphqlURL" . }}' browserName: MicrosoftEdge @@ -724,5 +777,116 @@ edgeNode: # It should be set using the --set-json option sidecars: [] +videoRecorder: + enabled: false + # Image of video recorder + imageName: selenium/video + # Image of video recorder + imageTag: ffmpeg-6.0-20231110 + # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) + imagePullPolicy: IfNotPresent + # Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) + + # What uploader to use. See .videRecorder.s3 for how to create a new one. + # uploader: s3 + uploader: false + # Where to upload the video file. Should be set to something like 's3://myvideobucket/' + uploadDestinationPrefix: false + + ports: + - 9000 + resources: + requests: + memory: "1Gi" + cpu: "1" + limits: + memory: "1Gi" + cpu: "1" + extraEnvironmentVariables: + # - name: SE_VIDEO_FOLDER + # value: /videos + # Custom environment variables by sourcing entire configMap, Secret, etc. for video recorder. + extraEnvFrom: + # - configMapRef: + # name: proxy-settings + # - secretRef: + # name: mysecret + # Wait for pod startup + terminationGracePeriodSeconds: 30 + + # Wait for pod startup + startupProbe: {} + # httpGet: + # path: / + # port: 9000 + # failureThreshold: 120 + # periodSeconds: 5 + + # Liveness probe settings + livenessProbe: {} + + volume: + # name: + # folder: video + # scripts: video-scripts + # Custom video recorder back-end scripts (video.sh, video_ready.py, etc.) further by ConfigMap. + # NOTE: For the mount point with the name "video", or "video-scripts", it will override the default. For other names, it will be appended. + extraVolumeMounts: [] + # - name: video-scripts + # mountPath: /opt/bin/video.sh + # subPath: custom_video.sh + # - name: video-scripts + # mountPath: /opt/bin/video_ready.py + # subPath: video_ready.py + + extraVolumes: [] + # - name: video-scripts + # configMap: + # name: my-video-scripts-cm + # defaultMode: 0500 + # - name: video + # persistentVolumeClaim: + # claimName: video-pv-claim + + # Container spec for the uploader if above it is defined as "uploader: s3" + s3: + imageName: public.ecr.aws/bitnami/aws-cli + imageTag: "2" + imagePullPolicy: IfNotPresent + securityContext: + runAsUser: 0 + command: + - /bin/sh + args: + - -c + - | + while ! [ -p /videos/uploadpipe ] + do + echo Waiting for /videos/uploadpipe to be created + sleep 1 + done + echo Waiting for files to upload + while read FILE DESTINATION < /videos/uploadpipe + do + if [ "$FILE" = "exit" ] + then + echo "$FILE" + break + else + echo "Uploading $FILE to $DESTINATION" + aws s3 cp --no-progress $FILE $DESTINATION + fi + done + extraEnvironmentVariables: + # - name: AWS_ACCESS_KEY_ID + # value: aws_access_key_id + # - name: AWS_SECRET_ACCESS_KEY + # value: aws_secret_access_key + # - name: + # valueFrom: + # secretKeyRef: + # name: secret-name + # key: secret-key + # Custom labels for k8s resources customLabels: {} diff --git a/docker-compose-v2-tracing.yml b/docker-compose-v2-tracing.yml index 9e64e2204..a47865695 100644 --- a/docker-compose-v2-tracing.yml +++ b/docker-compose-v2-tracing.yml @@ -9,7 +9,7 @@ services: - "16686:16686" - "14250:14250" chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -23,7 +23,7 @@ services: - "6900:5900" edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -37,7 +37,7 @@ services: - "6901:5900" firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -51,7 +51,7 @@ services: - "6902:5900" selenium-hub: - image: selenium/hub:4.12.1-20230920 + image: selenium/hub:4.15.0-20231110 ports: - "4442:4442" - "4443:4443" diff --git a/docker-compose-v2.yml b/docker-compose-v2.yml index ef92434e4..ca18aa427 100644 --- a/docker-compose-v2.yml +++ b/docker-compose-v2.yml @@ -4,7 +4,7 @@ version: '2' services: chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -16,7 +16,7 @@ services: - "6900:5900" edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -28,7 +28,7 @@ services: - "6901:5900" firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -40,7 +40,7 @@ services: - "6902:5900" selenium-hub: - image: selenium/hub:4.12.1-20230920 + image: selenium/hub:4.15.0-20231110 ports: - "4442:4442" - "4443:4443" diff --git a/docker-compose-v3-basicauth.yml b/docker-compose-v3-basicauth.yml index 64937694c..c5894143b 100644 --- a/docker-compose-v3-basicauth.yml +++ b/docker-compose-v3-basicauth.yml @@ -4,7 +4,7 @@ version: "3" services: chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -14,7 +14,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -24,7 +24,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -34,7 +34,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 selenium-hub: - image: selenium/hub:4.12.1-20230920 + image: selenium/hub:4.15.0-20231110 container_name: selenium-hub ports: - "4442:4442" diff --git a/docker-compose-v3-dev.yml b/docker-compose-v3-dev.yml index 6cbae1478..0d1705d29 100644 --- a/docker-compose-v3-dev.yml +++ b/docker-compose-v3-dev.yml @@ -4,7 +4,7 @@ version: "3" services: chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar @@ -16,7 +16,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar @@ -28,7 +28,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar @@ -40,7 +40,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 selenium-hub: - image: selenium/hub:4.12.1-20230920 + image: selenium/hub:4.15.0-20231110 container_name: selenium-hub volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar diff --git a/docker-compose-v3-dynamic-grid.yml b/docker-compose-v3-dynamic-grid.yml index a091c6a5d..1405e44a4 100644 --- a/docker-compose-v3-dynamic-grid.yml +++ b/docker-compose-v3-dynamic-grid.yml @@ -4,7 +4,7 @@ version: "3" services: node-docker: - image: selenium/node-docker:4.12.1-20230920 + image: selenium/node-docker:4.15.0-20231110 volumes: - ./assets:/opt/selenium/assets - ./NodeDocker/config.toml:/opt/bin/config.toml @@ -17,7 +17,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 selenium-hub: - image: selenium/hub:4.12.1-20230920 + image: selenium/hub:4.15.0-20231110 container_name: selenium-hub ports: - "4442:4442" diff --git a/docker-compose-v3-full-grid-dev.yml b/docker-compose-v3-full-grid-dev.yml index d4345a711..26a49b696 100644 --- a/docker-compose-v3-full-grid-dev.yml +++ b/docker-compose-v3-full-grid-dev.yml @@ -4,7 +4,7 @@ version: "3" services: selenium-event-bus: - image: selenium/event-bus:4.12.1-20230920 + image: selenium/event-bus:4.15.0-20231110 volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar container_name: selenium-event-bus @@ -14,7 +14,7 @@ services: - "5557:5557" selenium-sessions: - image: selenium/sessions:4.12.1-20230920 + image: selenium/sessions:4.15.0-20231110 volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar container_name: selenium-sessions @@ -28,7 +28,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 selenium-session-queue: - image: selenium/session-queue:4.12.1-20230920 + image: selenium/session-queue:4.15.0-20231110 volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar container_name: selenium-session-queue @@ -36,7 +36,7 @@ services: - "5559:5559" selenium-distributor: - image: selenium/distributor:4.12.1-20230920 + image: selenium/distributor:4.15.0-20231110 volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar container_name: selenium-distributor @@ -56,7 +56,7 @@ services: - SE_SESSION_QUEUE_PORT=5559 selenium-router: - image: selenium/router:4.12.1-20230920 + image: selenium/router:4.15.0-20231110 volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar container_name: selenium-router @@ -75,7 +75,7 @@ services: - SE_SESSION_QUEUE_PORT=5559 chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar @@ -87,7 +87,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar @@ -99,7 +99,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb volumes: - ./selenium_server_deploy.jar:/opt/selenium/selenium-server.jar diff --git a/docker-compose-v3-full-grid-swarm.yml b/docker-compose-v3-full-grid-swarm.yml index 2f0ca79a3..d99d05789 100644 --- a/docker-compose-v3-full-grid-swarm.yml +++ b/docker-compose-v3-full-grid-swarm.yml @@ -7,7 +7,7 @@ version: '3.7' services: chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb environment: - SE_EVENT_BUS_HOST=selenium-hub @@ -18,7 +18,7 @@ services: entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh' edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb environment: - SE_EVENT_BUS_HOST=selenium-hub @@ -29,7 +29,7 @@ services: entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh' firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb environment: - SE_EVENT_BUS_HOST=selenium-hub @@ -40,7 +40,7 @@ services: entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh' selenium-hub: - image: selenium/hub:4.12.1-20230920 + image: selenium/hub:4.15.0-20231110 ports: - "4442:4442" - "4443:4443" diff --git a/docker-compose-v3-full-grid-tracing.yml b/docker-compose-v3-full-grid-tracing.yml index d650ad0fc..a5be01740 100644 --- a/docker-compose-v3-full-grid-tracing.yml +++ b/docker-compose-v3-full-grid-tracing.yml @@ -9,7 +9,7 @@ services: - "16686:16686" - "14250:14250" selenium-event-bus: - image: selenium/event-bus:4.12.1-20230920 + image: selenium/event-bus:4.15.0-20231110 container_name: selenium-event-bus ports: - "4442:4442" @@ -21,7 +21,7 @@ services: - SE_ENABLE_TRACING=true - JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-event-bus selenium-sessions: - image: selenium/sessions:4.12.1-20230920 + image: selenium/sessions:4.15.0-20231110 container_name: selenium-sessions ports: - "5556:5556" @@ -34,7 +34,7 @@ services: - SE_ENABLE_TRACING=true - JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-sessions selenium-session-queue: - image: selenium/session-queue:4.12.1-20230920 + image: selenium/session-queue:4.15.0-20231110 container_name: selenium-session-queue ports: - "5559:5559" @@ -42,7 +42,7 @@ services: - SE_ENABLE_TRACING=true - JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-session-queue selenium-distributor: - image: selenium/distributor:4.12.1-20230920 + image: selenium/distributor:4.15.0-20231110 container_name: selenium-distributor ports: - "5553:5553" @@ -61,7 +61,7 @@ services: - SE_ENABLE_TRACING=true - JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-distributor selenium-router: - image: selenium/router:4.12.1-20230920 + image: selenium/router:4.15.0-20231110 container_name: selenium-router ports: - "4444:4444" @@ -79,7 +79,7 @@ services: - SE_ENABLE_TRACING=true - JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-router chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-event-bus @@ -90,7 +90,7 @@ services: - SE_ENABLE_TRACING=true - JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-node-chrome edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-event-bus @@ -101,7 +101,7 @@ services: - SE_ENABLE_TRACING=true - JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-node-edge firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-event-bus diff --git a/docker-compose-v3-full-grid.yml b/docker-compose-v3-full-grid.yml index d97cacc4d..432747bfd 100644 --- a/docker-compose-v3-full-grid.yml +++ b/docker-compose-v3-full-grid.yml @@ -4,7 +4,7 @@ version: "3" services: selenium-event-bus: - image: selenium/event-bus:4.12.1-20230920 + image: selenium/event-bus:4.15.0-20231110 container_name: selenium-event-bus ports: - "4442:4442" @@ -12,7 +12,7 @@ services: - "5557:5557" selenium-sessions: - image: selenium/sessions:4.12.1-20230920 + image: selenium/sessions:4.15.0-20231110 container_name: selenium-sessions ports: - "5556:5556" @@ -24,13 +24,13 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 selenium-session-queue: - image: selenium/session-queue:4.12.1-20230920 + image: selenium/session-queue:4.15.0-20231110 container_name: selenium-session-queue ports: - "5559:5559" selenium-distributor: - image: selenium/distributor:4.12.1-20230920 + image: selenium/distributor:4.15.0-20231110 container_name: selenium-distributor ports: - "5553:5553" @@ -48,7 +48,7 @@ services: - SE_SESSION_QUEUE_PORT=5559 selenium-router: - image: selenium/router:4.12.1-20230920 + image: selenium/router:4.15.0-20231110 container_name: selenium-router ports: - "4444:4444" @@ -65,7 +65,7 @@ services: - SE_SESSION_QUEUE_PORT=5559 chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-event-bus @@ -75,7 +75,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-event-bus @@ -85,7 +85,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-event-bus diff --git a/docker-compose-v3-swarm.yml b/docker-compose-v3-swarm.yml index 2f0ca79a3..d99d05789 100644 --- a/docker-compose-v3-swarm.yml +++ b/docker-compose-v3-swarm.yml @@ -7,7 +7,7 @@ version: '3.7' services: chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb environment: - SE_EVENT_BUS_HOST=selenium-hub @@ -18,7 +18,7 @@ services: entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh' edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb environment: - SE_EVENT_BUS_HOST=selenium-hub @@ -29,7 +29,7 @@ services: entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh' firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb environment: - SE_EVENT_BUS_HOST=selenium-hub @@ -40,7 +40,7 @@ services: entrypoint: bash -c 'SE_OPTS="--host $$HOSTNAME" /opt/bin/entry_point.sh' selenium-hub: - image: selenium/hub:4.12.1-20230920 + image: selenium/hub:4.15.0-20231110 ports: - "4442:4442" - "4443:4443" diff --git a/docker-compose-v3-tracing.yml b/docker-compose-v3-tracing.yml index f9611c3ef..4b54490f6 100644 --- a/docker-compose-v3-tracing.yml +++ b/docker-compose-v3-tracing.yml @@ -9,7 +9,7 @@ services: - "16686:16686" - "14250:14250" chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -21,7 +21,7 @@ services: - JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-node-chrome edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -33,7 +33,7 @@ services: - JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-node-edge firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -45,7 +45,7 @@ services: - JAVA_OPTS=-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar:14250 -Dotel.resource.attributes=service.name=selenium-node-firefox selenium-hub: - image: selenium/hub:4.12.1-20230920 + image: selenium/hub:4.15.0-20231110 container_name: selenium-hub ports: - "4442:4442" diff --git a/docker-compose-v3-video.yml b/docker-compose-v3-video.yml index 3fbfab199..5e4b5dd0a 100644 --- a/docker-compose-v3-video.yml +++ b/docker-compose-v3-video.yml @@ -4,7 +4,7 @@ version: "3" services: chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -14,7 +14,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -24,7 +24,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -34,7 +34,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 chrome_video: - image: selenium/video:ffmpeg-4.3.1-20230920 + image: selenium/video:ffmpeg-6.0-20231110 volumes: - /tmp/videos:/videos depends_on: @@ -44,7 +44,7 @@ services: - FILE_NAME=chrome_video.mp4 edge_video: - image: selenium/video:ffmpeg-4.3.1-20230920 + image: selenium/video:ffmpeg-6.0-20231110 volumes: - /tmp/videos:/videos depends_on: @@ -54,7 +54,7 @@ services: - FILE_NAME=edge_video.mp4 firefox_video: - image: selenium/video:ffmpeg-4.3.1-20230920 + image: selenium/video:ffmpeg-6.0-20231110 volumes: - /tmp/videos:/videos depends_on: @@ -64,7 +64,7 @@ services: - FILE_NAME=firefox_video.mp4 selenium-hub: - image: selenium/hub:4.12.1-20230920 + image: selenium/hub:4.15.0-20231110 container_name: selenium-hub ports: - "4442:4442" diff --git a/docker-compose-v3.yml b/docker-compose-v3.yml index 8636018bc..83464f7d3 100644 --- a/docker-compose-v3.yml +++ b/docker-compose-v3.yml @@ -4,7 +4,7 @@ version: "3" services: chrome: - image: selenium/node-chrome:4.12.1-20230920 + image: selenium/node-chrome:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -14,7 +14,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 edge: - image: selenium/node-edge:4.12.1-20230920 + image: selenium/node-edge:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -24,7 +24,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 firefox: - image: selenium/node-firefox:4.12.1-20230920 + image: selenium/node-firefox:4.15.0-20231110 shm_size: 2gb depends_on: - selenium-hub @@ -34,7 +34,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 selenium-hub: - image: selenium/hub:4.12.1-20230920 + image: selenium/hub:4.15.0-20231110 container_name: selenium-hub ports: - "4442:4442" diff --git a/generate_release_notes.sh b/generate_release_notes.sh index 014f56156..c936c48d4 100755 --- a/generate_release_notes.sh +++ b/generate_release_notes.sh @@ -17,7 +17,7 @@ CHROMEDRIVER_VERSION=$(docker run --rm selenium/node-chrome:${TAG_VERSION} chrom EDGEDRIVER_VERSION=$(docker run --rm selenium/node-edge:${TAG_VERSION} msedgedriver --version | awk '{print $4}') FIREFOX_VERSION=$(docker run --rm selenium/node-firefox:${TAG_VERSION} firefox --version | awk '{print $3}') GECKODRIVER_VERSION=$(docker run --rm selenium/node-firefox:${TAG_VERSION} geckodriver --version | awk 'NR==1{print $2}') -FFMPEG_VERSION=$(docker run --entrypoint="" --rm selenium/video:ffmpeg-4.3.1-${BUILD_DATE} ffmpeg -version | awk '{print $3}' | head -n 1) +FFMPEG_VERSION=$(docker run --entrypoint="" --rm selenium/video:ffmpeg-6.0-${BUILD_DATE} ffmpeg -version | awk '{print $3}' | head -n 1) echo "" >> release_notes.md diff --git a/tests/bootstrap.sh b/tests/bootstrap.sh index 504ca061a..a210862fa 100755 --- a/tests/bootstrap.sh +++ b/tests/bootstrap.sh @@ -7,7 +7,7 @@ if [ "${CI:-false}" = "false" ]; then source docker-selenium-tests/bin/activate fi -python -m pip install selenium==4.12.0 \ +python -m pip install selenium==4.15.0 \ docker===6.1.3 \ | grep -v 'Requirement already satisfied' diff --git a/tests/chart-test.yaml b/tests/chart-test.yaml new file mode 100644 index 000000000..e54edd7a3 --- /dev/null +++ b/tests/chart-test.yaml @@ -0,0 +1,8 @@ +target-branch: trunk +chart-dirs: + - charts +chart-repos: + - kedacore=https://kedacore.github.io/charts +upgrade: false +helm-extra-args: --timeout 600s +check-version-increment: false