Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/helm-chart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,20 @@ jobs:
fail-fast: false
matrix:
include:
- k8s-version: 'v1.26.15'
- k8s-version: 'v1.34.1'
cluster: 'minikube'
helm-version: 'v3.11.3'
docker-version: '26.1.4'
helm-version: 'v3.19.0'
docker-version: '28.4.0'
python-version: '3.9'
test-upgrade: true
service-mesh: false
os: ubuntu-22.04
check-records-output: true
test-strategy: disabled
- k8s-version: 'v1.27.16'
- k8s-version: 'v1.34.1'
cluster: 'minikube'
helm-version: 'v3.12.3'
docker-version: '26.1.4'
helm-version: 'v3.18.6'
docker-version: '28.3.3'
python-version: '3.9'
test-upgrade: true
service-mesh: false
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
os: ubuntu-22.04
check-records-output: true
test-strategy: job_hostname
- k8s-version: 'v1.31.11'
- k8s-version: 'v1.31.12'
cluster: 'minikube'
helm-version: 'v3.16.4'
docker-version: '27.4.1'
Expand All @@ -109,7 +109,7 @@ jobs:
os: ubuntu-22.04
check-records-output: true
test-strategy: deployment_https
- k8s-version: 'v1.32.7'
- k8s-version: 'v1.32.9'
cluster: 'minikube'
helm-version: 'v3.17.4'
docker-version: '26.1.4'
Expand All @@ -119,9 +119,9 @@ jobs:
os: ubuntu-22.04
check-records-output: true
test-strategy: playwright_connect_grid
- k8s-version: 'v1.33.3'
- k8s-version: 'v1.33.5'
cluster: 'minikube'
helm-version: 'v3.18.4'
helm-version: 'v3.18.6'
docker-version: '26.1.4'
python-version: '3.10'
test-upgrade: true
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/k8s-scaling-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ jobs:
fail-fast: false
matrix:
include:
- k8s-version: 'v1.27.16'
- k8s-version: 'v1.34.1'
cluster: 'minikube'
helm-version: 'v3.12.3'
docker-version: '26.1.4'
helm-version: 'v3.19.0'
docker-version: '28.4.0'
python-version: '3.9'
os: ubuntu-22.04
test-strategy: test_k8s_autoscaling_job_count_strategy_default_in_chaos
- k8s-version: 'v1.28.15'
- k8s-version: 'v1.34.1'
cluster: 'minikube'
helm-version: 'v3.13.3'
docker-version: '26.1.4'
helm-version: 'v3.18.6'
docker-version: '28.3.3'
python-version: '3.10'
os: ubuntu-22.04
test-strategy: test_k8s_autoscaling_job_count_strategy_default_with_node_max_sessions
Expand All @@ -99,14 +99,14 @@ jobs:
python-version: '3.12'
os: ubuntu-22.04
test-strategy: test_k8s_autoscaling_deployment_count_in_chaos
- k8s-version: 'v1.31.11'
- k8s-version: 'v1.31.12'
cluster: 'minikube'
helm-version: 'v3.16.4'
docker-version: '27.4.1'
python-version: '3.13'
os: ubuntu-22.04
test-strategy: test_k8s_autoscaling_deployment_count_with_node_max_sessions
- k8s-version: 'v1.32.7'
- k8s-version: 'v1.32.9'
cluster: 'minikube'
helm-version: 'v3.17.4'
docker-version: '26.1.4'
Expand Down
25 changes: 25 additions & 0 deletions .tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ubuntu:noble

ARG AUTHORS=SeleniumHQ
LABEL authors="${AUTHORS} <docker-selenium@seleniumhq.org>"
LABEL org.opencontainers.image.source="https://github.com/${AUTHORS}/docker-selenium"

ARG KUBECTL_VERSION

RUN apt-get update && apt-get install -y curl && \
ARCH=$(dpkg --print-architecture) && \
VERSION=${KUBECTL_VERSION:-$(curl -L -s https://dl.k8s.io/release/stable.txt)} && \
curl -LO "https://dl.k8s.io/release/${VERSION}/bin/linux/${ARCH}/kubectl" && \
curl -LO "https://dl.k8s.io/${VERSION}/bin/linux/${ARCH}/kubectl.sha256" && \
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/ && \
rm kubectl.sha256 && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN useradd -m kubectl
USER kubectl

RUN kubectl version --client

ENTRYPOINT ["kubectl"]
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ all: hub \
standalone_firefox \
standalone_docker \
standalone_all_browsers \
video
video \
tools

check_dev_env:
./tests/charts/make/chart_check_env.sh
Expand Down Expand Up @@ -292,6 +293,10 @@ video: base
ffmpeg:
cd ./.ffmpeg && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) --build-arg FFMPEG_VERSION=$(FFMPEG_VERSION) $(FROM_IMAGE_ARGS) -t $(NAME)/ffmpeg:$(FFMPEG_VERSION)-$(BUILD_DATE) .

tools:
cd ./.tools && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) -t $(NAME)/tools:$(BUILD_DATE) .
docker tag $(NAME)/tools:$(BUILD_DATE) $(NAME)/tools:latest

all_browsers: node_base
cd ./NodeChromium && docker buildx build --platform $(PLATFORMS) $(BUILD_ARGS) $(FROM_IMAGE_ARGS) --build-arg BASE=node-base --build-arg CHROMIUM_VERSION=$(CHROMIUM_VERSION) -t $(NAME)/node-all-browsers:$(TAG_VERSION) . ; \
cd .. ; \
Expand Down Expand Up @@ -414,6 +419,7 @@ tag_latest:
docker tag $(NAME)/standalone-docker:$(TAG_VERSION) $(NAME)/standalone-docker:latest
docker tag $(NAME)/standalone-all-browsers:$(TAG_VERSION) $(NAME)/standalone-all-browsers:latest
docker tag $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) $(NAME)/video:latest
docker tag $(NAME)/tools:$(BUILD_DATE) $(NAME)/tools:latest
case "$(PLATFORMS)" in *linux/amd64*) \
docker tag $(NAME)/node-chrome:$(TAG_VERSION) $(NAME)/node-chrome:latest && \
docker tag $(NAME)/standalone-chrome:$(TAG_VERSION) $(NAME)/standalone-chrome:latest && \
Expand Down Expand Up @@ -452,6 +458,7 @@ release_latest: release_grid_scaler_latest
docker push $(NAME)/standalone-docker:latest
docker push $(NAME)/standalone-all-browsers:latest
docker push $(NAME)/video:latest
docker push $(NAME)/tools:latest

generate_latest_sbom:
NAME=$(NAME) FILTER_IMAGE_TAG=latest OUTPUT_FILE=$(SBOM_OUTPUT) ./generate_sbom.sh
Expand All @@ -474,6 +481,7 @@ tag_nightly:
docker tag $(NAME)/standalone-docker:$(TAG_VERSION) $(NAME)/standalone-docker:nightly
docker tag $(NAME)/standalone-all-browsers:$(TAG_VERSION) $(NAME)/standalone-all-browsers:nightly
docker tag $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) $(NAME)/video:nightly
docker tag $(NAME)/tools:$(BUILD_DATE) $(NAME)/tools:nightly
case "$(PLATFORMS)" in *linux/amd64*) \
docker tag $(NAME)/node-chrome:$(TAG_VERSION) $(NAME)/node-chrome:nightly && \
docker tag $(NAME)/standalone-chrome:$(TAG_VERSION) $(NAME)/standalone-chrome:nightly && \
Expand Down Expand Up @@ -507,6 +515,7 @@ release_nightly: release_grid_scaler_nightly
docker push $(NAME)/standalone-docker:nightly
docker push $(NAME)/standalone-all-browsers:nightly
docker push $(NAME)/video:nightly
docker push $(NAME)/tools:nightly

generate_nightly_sbom:
NAME=$(NAME) FILTER_IMAGE_TAG=nightly OUTPUT_FILE=$(SBOM_OUTPUT) ./generate_sbom.sh
Expand Down
4 changes: 2 additions & 2 deletions charts/selenium-grid/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| global.seleniumGrid.imageTag | string | `"4.35.0-20250828"` | Image tag for all selenium components |
| global.seleniumGrid.nodesImageTag | string | `"4.35.0-20250828"` | Image tag for browser's nodes |
| global.seleniumGrid.videoImageTag | string | `"ffmpeg-8.0-20250828"` | Image tag for browser's video recorder |
| global.seleniumGrid.kubectlImage | string | `"bitnami/kubectl:latest"` | kubectl image is used to execute kubectl commands in utility jobs |
| global.seleniumGrid.kubectlImage | string | `"selenium/tools:latest"` | kubectl image is used to execute kubectl commands in utility jobs |
| global.seleniumGrid.imagePullSecret | string | `""` | Pull secret for all components, can be overridden individually |
| global.seleniumGrid.logLevel | string | `"INFO"` | Log level for all components. Possible values describe here: https://www.selenium.dev/documentation/grid/configuration/cli_options/#logging |
| global.seleniumGrid.defaultNodeStartupProbe | string | `"exec"` | Set default startup probe method for all nodes (supplied values: httpGet, exec). If not set, the default is httpGet |
Expand Down Expand Up @@ -402,7 +402,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| autoscaling.annotations | object | `{"helm.sh/hook":"post-install,post-upgrade,post-rollback","helm.sh/hook-weight":"1"}` | Annotations for KEDA resources: ScaledObject and ScaledJob |
| autoscaling.patchObjectFinalizers.nameOverride | string | `nil` | Override the name of the patch job |
| autoscaling.patchObjectFinalizers.enabled | bool | `true` | Enable patching finalizers for KEDA scaled resources. Workaround for Hook post-upgrade selenium-grid/templates/x-node-hpa.yaml failed: object is being deleted: scaledobjects.keda.sh "x" already exists |
| autoscaling.patchObjectFinalizers.activeDeadlineSeconds | int | `300` | Deadline (in seconds) for patch job to complete |
| autoscaling.patchObjectFinalizers.activeDeadlineSeconds | int | `600` | Deadline (in seconds) for patch job to complete |
| autoscaling.patchObjectFinalizers.annotations | object | `{"helm.sh/hook":"post-install,post-upgrade,post-rollback,pre-delete","helm.sh/hook-delete-policy":"hook-succeeded,before-hook-creation"}` | Annotations for patch job |
| autoscaling.patchObjectFinalizers.deleteObjectsScript | string | `""` | Define your custom script to replace the default script |
| autoscaling.patchObjectFinalizers.patchFinalizersScript | string | `""` | Define your custom script to replace the default script |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ spec:
{{- with $.Values.autoscaling.patchObjectFinalizers.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.autoscaling.patchObjectFinalizers.tolerations }}
tolerations: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.autoscaling.patchObjectFinalizers.tolerations }}
tolerations: {{ toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: cleanup-script
configMap:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ spec:
{{- with $.Values.autoscaling.patchObjectFinalizers.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.autoscaling.patchObjectFinalizers.tolerations }}
tolerations: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.autoscaling.patchObjectFinalizers.tolerations }}
tolerations: {{ toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: cleanup-script
configMap:
Expand Down
4 changes: 2 additions & 2 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ global:
# -- Image tag for browser's video recorder
videoImageTag: ffmpeg-8.0-20250828
# -- kubectl image is used to execute kubectl commands in utility jobs
kubectlImage: bitnami/kubectl:latest
kubectlImage: selenium/tools:latest
# -- Pull secret for all components, can be overridden individually
imagePullSecret: ""
# -- Log level for all components. Possible values describe here: https://www.selenium.dev/documentation/grid/configuration/cli_options/#logging
Expand Down Expand Up @@ -1055,7 +1055,7 @@ autoscaling:
# -- Enable patching finalizers for KEDA scaled resources. Workaround for Hook post-upgrade selenium-grid/templates/x-node-hpa.yaml failed: object is being deleted: scaledobjects.keda.sh "x" already exists
enabled: true
# -- Deadline (in seconds) for patch job to complete
activeDeadlineSeconds: 300
activeDeadlineSeconds: 600
# -- Annotations for patch job
annotations:
"helm.sh/hook": post-install,post-upgrade,post-rollback,pre-delete
Expand Down
1 change: 1 addition & 0 deletions tests/charts/make/chart_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ HELM_COMMAND_SET_IMAGES=" \
--set global.seleniumGrid.imageTag=${VERSION} \
--set global.seleniumGrid.nodesImageTag=${VERSION} \
--set global.seleniumGrid.videoImageTag=${VIDEO_TAG} \
--set global.seleniumGrid.kubectlImage=${NAMESPACE}/tools:latest \
--set autoscaling.scaledOptions.pollingInterval=${AUTOSCALING_POLL_INTERVAL} \
--set tracing.enabled=${CHART_ENABLE_TRACING} \
--set global.seleniumGrid.httpLogs=${CHART_ENABLE_TRACING} \
Expand Down
6 changes: 6 additions & 0 deletions tests/charts/templates/render/dummy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ monitoring:
autoscaling:
enableWithExistingKEDA: true
scalingType: deployment
patchObjectFinalizers:
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
value: "true"
effect: "NoExecute"
scaledObjectOptions:
pollingInterval: 30
initialCooldownPeriod: 0
Expand Down
6 changes: 6 additions & 0 deletions tests/charts/templates/render/dummy_solution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ selenium-grid:
autoscaling:
enableWithExistingKEDA: true
scalingType: deployment
patchObjectFinalizers:
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Equal"
value: "true"
effect: "NoExecute"

monitoring:
enabledWithExistingAgent: true
Expand Down
Loading