diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6ec2a7d98..0bdda25c5 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -9,8 +9,6 @@ permissions: jobs: build-and-test: - # Skip job based on the commit message, only works in push to branches for now - if: contains(toJson(github.event.commits), '[skip ci]') == false name: Build & test Docker images with random user runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8b4c99084..de0ac5db9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -78,7 +78,7 @@ jobs: run: | git config --local user.email "selenium-ci@users.noreply.github.com" git config --local user.name "Selenium CI Bot" - git commit -m "Update tag in docs and files [skip ci]" -a + git commit -m "Update tag in docs and files" -a - name: Push changes uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # master with: diff --git a/.github/workflows/helm-chart-release.yml b/.github/workflows/helm-chart-release.yml index e31046aba..252ca1840 100644 --- a/.github/workflows/helm-chart-release.yml +++ b/.github/workflows/helm-chart-release.yml @@ -6,6 +6,7 @@ on: - trunk paths: - 'charts/selenium-grid/Chart.yaml' + workflow_dispatch: jobs: release: diff --git a/.github/workflows/helm-chart-test.yml b/.github/workflows/helm-chart-test.yml index 9d2c4a8fc..2c1cd307c 100644 --- a/.github/workflows/helm-chart-test.yml +++ b/.github/workflows/helm-chart-test.yml @@ -14,8 +14,6 @@ permissions: jobs: build-and-test: - # Skip job based on the commit message, only works in push to branches for now - if: contains(toJson(github.event.commits), '[skip ci]') == false name: Build & test Docker images with Helm charts runs-on: ubuntu-latest steps: diff --git a/.github/workflows/test-video.yml b/.github/workflows/test-video.yml index da59f8a8f..e65301460 100644 --- a/.github/workflows/test-video.yml +++ b/.github/workflows/test-video.yml @@ -9,8 +9,6 @@ permissions: jobs: build-and-test: - # Skip job based on the commit message, only works in push to branches for now - if: contains(toJson(github.event.commits), '[skip ci]') == false name: Test video recorded through Docker Selenium runs-on: ubuntu-latest steps: diff --git a/charts/selenium-grid/README.md b/charts/selenium-grid/README.md index 3bb8dff49..94d46fb4e 100644 --- a/charts/selenium-grid/README.md +++ b/charts/selenium-grid/README.md @@ -33,7 +33,7 @@ helm install selenium-grid --set ingress.hostname=selenium-grid.k8s.local docker ## Enable Selenium Grid Autoscaling -Selenium Grid has the ability to autoscale browser nodes up/down based on the pending requests in the +Selenium Grid has the ability to autoscaling browser nodes up/down based on the pending requests in the session queue. To do this [KEDA](https://keda.sh/docs/2.12/scalers/selenium-grid-scaler/) is used. When enabling @@ -83,13 +83,15 @@ helm uninstall selenium-grid For now, global configuration supported is: -| Parameter | Default | Description | -|---------------------------------------|-------------------|---------------------------------------| -| `global.seleniumGrid.imageTag` | `4.15.0-20231128` | Image tag for all selenium components | -| `global.seleniumGrid.nodesImageTag` | `4.15.0-20231128` | 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 | +| Parameter | Default | Description | +|---------------------------------------|-----------------------|---------------------------------------| +| `global.seleniumGrid.imageRegistry` | `selenium` | Distribution registry to pull images | +| `global.seleniumGrid.imageTag` | `4.15.0-20231128` | Image tag for all selenium components | +| `global.seleniumGrid.nodesImageTag` | `4.15.0-20231128` | Image tag for browser's nodes | +| `global.seleniumGrid.videoImageTag` | `ffmpeg-6.0-20231128` | Image tag for browser's video recoder | +| `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: @@ -127,7 +129,8 @@ This table contains the configuration parameters of the chart and their default | `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.imageRegistry` | `nil` | Distribution registry to pull the image | +| `chromeNode.imageName` | `node-chrome` | Image of chrome nodes | | `chromeNode.imageTag` | `4.15.0-20231128` | 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) | @@ -166,7 +169,8 @@ This table contains the configuration parameters of the chart and their default | `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.imageRegistry` | `nil` | Distribution registry to pull the image | +| `firefoxNode.imageName` | `node-firefox` | Image of firefox nodes | | `firefoxNode.imageTag` | `4.15.0-20231128` | 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) | @@ -205,7 +209,8 @@ This table contains the configuration parameters of the chart and their default | `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.imageRegistry` | `nil` | Distribution registry to pull the image | +| `edgeNode.imageName` | `node-edge` | Image of edge nodes | | `edgeNode.imageTag` | `4.15.0-20231128` | 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) | @@ -242,7 +247,8 @@ This table contains the configuration parameters of the chart and their default | `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.imageRegistry` | `nil` | Distribution registry to pull the image | +| `videoRecorder.imageName` | `video` | Selenium video recoder image name | | `videoRecorder.imageTag` | `ffmpeg-6.0-20231128` | 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` | @@ -279,7 +285,8 @@ You can configure the Selenium Hub with these values: | Parameter | Default | Description | |---------------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| -| `hub.imageName` | `selenium/hub` | Selenium Hub image name | +| `hub.imageRegistry` | `nil` | Distribution registry to pull the image | +| `hub.imageName` | `hub` | Selenium Hub image name | | `hub.imageTag` | `nil` | Selenium Hub image tag (this overwrites `.global.seleniumGrid.imageTag` value) | | `hub.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | | `hub.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | @@ -310,84 +317,89 @@ You can configure the Selenium Hub with these values: If you implement selenium-grid with separate components (`isolateComponents: true`), you can configure all components via the following values: -| Parameter | Default | Description | -|----------------------------------------------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| -| `components.router.imageName` | `selenium/router` | Router image name | -| `components.router.imageTag` | `nil` | Router image tag (this overwrites `.global.seleniumGrid.imageTag` value) | -| `components.router.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `components.router.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `components.router.annotations` | `{}` | Custom annotations for router pod | -| `components.router.port` | `4444` | Router port | -| `components.router.livenessProbe` | `See values.yaml` | Liveness probe settings | -| `components.router.readinessProbe` | `See values.yaml` | Readiness probe settings | -| `components.router.resources` | `{}` | Resources for router pod | -| `components.router.securityContext` | `See values.yaml` | Security context for router pod | -| `components.router.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| `components.router.loadBalancerIP` | `nil` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) | -| `components.router.serviceAnnotations` | `{}` | Custom annotations for router service | -| `components.router.tolerations` | `[]` | Tolerations for router pods | -| `components.router.nodeSelector` | `{}` | Node Selector for router pods | -| `components.router.affinity` | `{}` | Affinity for router pods | -| `components.router.priorityClassName` | `""` | Priority class name for router pods | -| `components.distributor.imageName` | `selenium/distributor` | Distributor image name | -| `components.distributor.imageTag` | `nil` | Distributor image tag (this overwrites `.global.seleniumGrid.imageTag` value) | -| `components.distributor.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `components.distributor.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `components.distributor.annotations` | `{}` | Custom annotations for Distributor pod | -| `components.distributor.port` | `5553` | Distributor port | -| `components.distributor.resources` | `{}` | Resources for Distributor pod | -| `components.distributor.securityContext` | `See values.yaml` | Security context for Distributor pod | -| `components.distributor.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| `components.distributor.serviceAnnotations` | `{}` | Custom annotations for Distributor service | -| `components.distributor.tolerations` | `[]` | Tolerations for Distributor pods | -| `components.distributor.nodeSelector` | `{}` | Node Selector for Distributor pods | -| `components.distributor.affinity` | `{}` | Affinity for Distributor pods | -| `components.distributor.priorityClassName` | `""` | Priority class name for Distributor pods | -| `components.eventBus.imageName` | `selenium/event-bus` | Event Bus image name | -| `components.eventBus.imageTag` | `nil` | Event Bus image tag (this overwrites `.global.seleniumGrid.imageTag` value) | -| `components.eventBus.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `components.eventBus.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `components.eventBus.annotations` | `{}` | Custom annotations for Event Bus pod | -| `components.eventBus.port` | `5557` | Event Bus port | -| `components.eventBus.publishPort` | `4442` | Port where events are published | -| `components.eventBus.subscribePort` | `4443` | Port where to subscribe for events | -| `components.eventBus.resources` | `{}` | Resources for event-bus pod | -| `components.eventBus.securityContext` | `See values.yaml` | Security context for event-bus pod | -| `components.eventBus.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| `components.eventBus.serviceAnnotations` | `{}` | Custom annotations for Event Bus service | -| `components.eventBus.tolerations` | `[]` | Tolerations for Event Bus pods | -| `components.eventBus.nodeSelector` | `{}` | Node Selector for Event Bus pods | -| `components.eventBus.affinity` | `{}` | Affinity for Event Bus pods | -| `components.eventBus.priorityClassName` | `""` | Priority class name for Event Bus pods | -| `components.sessionMap.imageName` | `selenium/sessions` | Session Map image name | -| `components.sessionMap.imageTag` | `nil` | Session Map image tag (this overwrites `.global.seleniumGrid.imageTag` value) | -| `components.sessionMap.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `components.sessionMap.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `components.sessionMap.annotations` | `{}` | Custom annotations for Session Map pod | -| `components.sessionMap.resources` | `{}` | Resources for Session Map pod | -| `components.sessionMap.securityContext` | `See values.yaml` | Security context for Session Map pod | -| `components.sessionMap.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| `components.sessionMap.serviceAnnotations` | `{}` | Custom annotations for Session Map service | -| `components.sessionMap.tolerations` | `[]` | Tolerations for Session Map pods | -| `components.sessionMap.nodeSelector` | `{}` | Node Selector for Session Map pods | -| `components.sessionMap.affinity` | `{}` | Affinity for Session Map pods | -| `components.sessionMap.priorityClassName` | `""` | Priority class name for Session Map pods | -| `components.sessionQueue.imageName` | `selenium/session-queue` | Session Queue image name | -| `components.sessionQueue.imageTag` | `nil` | Session Queue image tag (this overwrites `.global.seleniumGrid.imageTag` value) | -| `components.sessionQueue.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `components.sessionQueue.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `components.sessionQueue.annotations` | `{}` | Custom annotations for Session Queue pod | -| `components.sessionQueue.port` | `5559` | Session Queue Port | -| `components.sessionQueue.resources` | `{}` | Resources for Session Queue pod | -| `components.sessionQueue.securityContext` | `See values.yaml` | Security context for Session Queue pod | -| `components.sessionQueue.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| `components.sessionQueue.serviceAnnotations` | `{}` | Custom annotations for Session Queue service | -| `components.sessionQueue.tolerations` | `[]` | Tolerations for Session Queue pods | -| `components.sessionQueue.nodeSelector` | `{}` | Node Selector for Session Queue pods | -| `components.sessionQueue.affinity` | `{}` | Affinity for Session Queue pods | -| `components.sessionQueue.priorityClassName` | `""` | Priority class name for Session Queue pods | -| `components.subPath` | `/` | Custom sub path for all components | -| `components.extraEnvironmentVariables` | `nil` | Custom environment variables for all components | -| `components.extraEnvFrom` | `nil` | Custom environment variables taken from `configMap` or `secret` for all components | +| Parameter | Default | Description | +|----------------------------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| +| `components.router.imageRegistry` | `nil` | Distribution registry to pull the image | +| `components.router.imageName` | `router` | Router image name | +| `components.router.imageTag` | `nil` | Router image tag (this overwrites `.global.seleniumGrid.imageTag` value) | +| `components.router.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `components.router.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `components.router.annotations` | `{}` | Custom annotations for router pod | +| `components.router.port` | `4444` | Router port | +| `components.router.livenessProbe` | `See values.yaml` | Liveness probe settings | +| `components.router.readinessProbe` | `See values.yaml` | Readiness probe settings | +| `components.router.resources` | `{}` | Resources for router pod | +| `components.router.securityContext` | `See values.yaml` | Security context for router pod | +| `components.router.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | +| `components.router.loadBalancerIP` | `nil` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) | +| `components.router.serviceAnnotations` | `{}` | Custom annotations for router service | +| `components.router.tolerations` | `[]` | Tolerations for router pods | +| `components.router.nodeSelector` | `{}` | Node Selector for router pods | +| `components.router.affinity` | `{}` | Affinity for router pods | +| `components.router.priorityClassName` | `""` | Priority class name for router pods | +| `components.distributor.imageRegistry` | `nil` | Distribution registry to pull the image | +| `components.distributor.imageName` | `distributor` | Distributor image name | +| `components.distributor.imageTag` | `nil` | Distributor image tag (this overwrites `.global.seleniumGrid.imageTag` value) | +| `components.distributor.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `components.distributor.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `components.distributor.annotations` | `{}` | Custom annotations for Distributor pod | +| `components.distributor.port` | `5553` | Distributor port | +| `components.distributor.resources` | `{}` | Resources for Distributor pod | +| `components.distributor.securityContext` | `See values.yaml` | Security context for Distributor pod | +| `components.distributor.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | +| `components.distributor.serviceAnnotations` | `{}` | Custom annotations for Distributor service | +| `components.distributor.tolerations` | `[]` | Tolerations for Distributor pods | +| `components.distributor.nodeSelector` | `{}` | Node Selector for Distributor pods | +| `components.distributor.affinity` | `{}` | Affinity for Distributor pods | +| `components.distributor.priorityClassName` | `""` | Priority class name for Distributor pods | +| `components.eventBus.imageRegistry` | `nil` | Distribution registry to pull the image | +| `components.eventBus.imageName` | `event-bus` | Event Bus image name | +| `components.eventBus.imageTag` | `nil` | Event Bus image tag (this overwrites `.global.seleniumGrid.imageTag` value) | +| `components.eventBus.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `components.eventBus.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `components.eventBus.annotations` | `{}` | Custom annotations for Event Bus pod | +| `components.eventBus.port` | `5557` | Event Bus port | +| `components.eventBus.publishPort` | `4442` | Port where events are published | +| `components.eventBus.subscribePort` | `4443` | Port where to subscribe for events | +| `components.eventBus.resources` | `{}` | Resources for event-bus pod | +| `components.eventBus.securityContext` | `See values.yaml` | Security context for event-bus pod | +| `components.eventBus.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | +| `components.eventBus.serviceAnnotations` | `{}` | Custom annotations for Event Bus service | +| `components.eventBus.tolerations` | `[]` | Tolerations for Event Bus pods | +| `components.eventBus.nodeSelector` | `{}` | Node Selector for Event Bus pods | +| `components.eventBus.affinity` | `{}` | Affinity for Event Bus pods | +| `components.eventBus.priorityClassName` | `""` | Priority class name for Event Bus pods | +| `components.sessionMap.imageRegistry` | `nil` | Distribution registry to pull the image | +| `components.sessionMap.imageName` | `sessions` | Session Map image name | +| `components.sessionMap.imageTag` | `nil` | Session Map image tag (this overwrites `.global.seleniumGrid.imageTag` value) | +| `components.sessionMap.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `components.sessionMap.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `components.sessionMap.annotations` | `{}` | Custom annotations for Session Map pod | +| `components.sessionMap.resources` | `{}` | Resources for Session Map pod | +| `components.sessionMap.securityContext` | `See values.yaml` | Security context for Session Map pod | +| `components.sessionMap.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | +| `components.sessionMap.serviceAnnotations` | `{}` | Custom annotations for Session Map service | +| `components.sessionMap.tolerations` | `[]` | Tolerations for Session Map pods | +| `components.sessionMap.nodeSelector` | `{}` | Node Selector for Session Map pods | +| `components.sessionMap.affinity` | `{}` | Affinity for Session Map pods | +| `components.sessionMap.priorityClassName` | `""` | Priority class name for Session Map pods | +| `components.sessionQueue.imageRegistry` | `nil` | Distribution registry to pull the image | +| `components.sessionQueue.imageName` | `session-queue` | Session Queue image name | +| `components.sessionQueue.imageTag` | `nil` | Session Queue image tag (this overwrites `.global.seleniumGrid.imageTag` value) | +| `components.sessionQueue.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `components.sessionQueue.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `components.sessionQueue.annotations` | `{}` | Custom annotations for Session Queue pod | +| `components.sessionQueue.port` | `5559` | Session Queue Port | +| `components.sessionQueue.resources` | `{}` | Resources for Session Queue pod | +| `components.sessionQueue.securityContext` | `See values.yaml` | Security context for Session Queue pod | +| `components.sessionQueue.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | +| `components.sessionQueue.serviceAnnotations` | `{}` | Custom annotations for Session Queue service | +| `components.sessionQueue.tolerations` | `[]` | Tolerations for Session Queue pods | +| `components.sessionQueue.nodeSelector` | `{}` | Node Selector for Session Queue pods | +| `components.sessionQueue.affinity` | `{}` | Affinity for Session Queue pods | +| `components.sessionQueue.priorityClassName` | `""` | Priority class name for Session Queue pods | +| `components.subPath` | `/` | Custom sub path for all components | +| `components.extraEnvironmentVariables` | `nil` | Custom environment variables for all components | +| `components.extraEnvFrom` | `nil` | Custom environment variables taken from `configMap` or `secret` for all components | See how to customize a helm chart installation in the [Helm Docs](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing) for more information. diff --git a/charts/selenium-grid/ci/auth-ingress-values.yaml b/charts/selenium-grid/ci/auth-ingress-values.yaml index 459d218d3..e5d055ba6 100644 --- a/charts/selenium-grid/ci/auth-ingress-values.yaml +++ b/charts/selenium-grid/ci/auth-ingress-values.yaml @@ -3,6 +3,9 @@ ingress: nginx.ingress.kubernetes.io/use-regex: "true" nginx.ingress.kubernetes.io/rewrite-target: /$2 nginx.ingress.kubernetes.io/app-root: &gridAppRoot "/selenium" + nginx.ingress.kubernetes.io/proxy-connect-timeout: "360" + nginx.ingress.kubernetes.io/proxy-read-timeout: "360" + nginx.ingress.kubernetes.io/proxy-send-timeout: "360" hostname: "" paths: - path: /selenium(/|$)(.*) diff --git a/charts/selenium-grid/templates/_helpers.tpl b/charts/selenium-grid/templates/_helpers.tpl index 5fa362094..1b0aa573c 100644 --- a/charts/selenium-grid/templates/_helpers.tpl +++ b/charts/selenium-grid/templates/_helpers.tpl @@ -173,7 +173,8 @@ template: containers: - name: {{.name}} {{- $imageTag := default .Values.global.seleniumGrid.nodesImageTag .node.imageTag }} - image: {{ printf "%s:%s" .node.imageName $imageTag }} + {{- $imageRegistry := default .Values.global.seleniumGrid.imageRegistry .node.imageRegistry }} + image: {{ printf "%s/%s:%s" $imageRegistry .node.imageName $imageTag }} imagePullPolicy: {{ .node.imagePullPolicy }} {{- with .node.extraEnvironmentVariables }} env: {{- tpl (toYaml .) $ | nindent 10 }} @@ -217,7 +218,9 @@ template: {{- end }} {{- if .Values.videoRecorder.enabled }} - name: video - image: {{ printf "%s:%s" .Values.videoRecorder.imageName .Values.videoRecorder.imageTag }} + {{- $imageTag := default .Values.global.seleniumGrid.videoImageTag .Values.videoRecorder.imageTag }} + {{- $imageRegistry := default .Values.global.seleniumGrid.imageRegistry .Values.videoRecorder.imageRegistry }} + image: {{ printf "%s/%s:%s" $imageRegistry .Values.videoRecorder.imageName $imageTag }} imagePullPolicy: {{ .Values.videoRecorder.imagePullPolicy }} env: - name: UPLOAD_DESTINATION_PREFIX diff --git a/charts/selenium-grid/templates/distributor-deployment.yaml b/charts/selenium-grid/templates/distributor-deployment.yaml index fe5efd767..07462f15e 100644 --- a/charts/selenium-grid/templates/distributor-deployment.yaml +++ b/charts/selenium-grid/templates/distributor-deployment.yaml @@ -29,7 +29,8 @@ spec: containers: - name: {{ template "seleniumGrid.distributor.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.distributor.imageTag }} - image: {{ printf "%s:%s" .Values.components.distributor.imageName $imageTag }} + {{- $imageRegistry := default .Values.global.seleniumGrid.imageRegistry .Values.components.distributor.imageRegistry }} + image: {{ printf "%s/%s:%s" $imageRegistry .Values.components.distributor.imageName $imageTag }} imagePullPolicy: {{ .Values.components.distributor.imagePullPolicy }} env: - name: SE_SESSIONS_MAP_HOST diff --git a/charts/selenium-grid/templates/event-bus-deployment.yaml b/charts/selenium-grid/templates/event-bus-deployment.yaml index a315cd820..8d894790b 100644 --- a/charts/selenium-grid/templates/event-bus-deployment.yaml +++ b/charts/selenium-grid/templates/event-bus-deployment.yaml @@ -29,7 +29,8 @@ spec: containers: - name: {{ template "seleniumGrid.eventBus.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.eventBus.imageTag }} - image: {{ printf "%s:%s" .Values.components.eventBus.imageName $imageTag }} + {{- $imageRegistry := default .Values.global.seleniumGrid.imageRegistry .Values.components.eventBus.imageRegistry }} + image: {{ printf "%s/%s:%s" $imageRegistry .Values.components.eventBus.imageName $imageTag }} imagePullPolicy: {{ .Values.components.eventBus.imagePullPolicy }} ports: - containerPort: {{ .Values.components.eventBus.port }} diff --git a/charts/selenium-grid/templates/hub-deployment.yaml b/charts/selenium-grid/templates/hub-deployment.yaml index a5ea71ab5..8b322ecd5 100644 --- a/charts/selenium-grid/templates/hub-deployment.yaml +++ b/charts/selenium-grid/templates/hub-deployment.yaml @@ -32,7 +32,8 @@ spec: containers: - name: {{ template "seleniumGrid.hub.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.hub.imageTag }} - image: {{ printf "%s:%s" .Values.hub.imageName $imageTag }} + {{- $imageRegistry := default .Values.global.seleniumGrid.imageRegistry .Values.hub.imageRegistry }} + image: {{ printf "%s/%s:%s" $imageRegistry .Values.hub.imageName $imageTag }} imagePullPolicy: {{ .Values.hub.imagePullPolicy }} ports: - containerPort: {{ .Values.hub.port }} diff --git a/charts/selenium-grid/templates/router-deployment.yaml b/charts/selenium-grid/templates/router-deployment.yaml index 05ae9a7b9..33d98c65a 100644 --- a/charts/selenium-grid/templates/router-deployment.yaml +++ b/charts/selenium-grid/templates/router-deployment.yaml @@ -29,7 +29,8 @@ spec: containers: - name: {{ template "seleniumGrid.router.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.router.imageTag }} - image: {{ printf "%s:%s" .Values.components.router.imageName $imageTag }} + {{- $imageRegistry := default .Values.global.seleniumGrid.imageRegistry .Values.components.router.imageRegistry }} + image: {{ printf "%s/%s:%s" $imageRegistry .Values.components.router.imageName $imageTag }} imagePullPolicy: {{ .Values.components.router.imagePullPolicy }} env: - name: SE_DISTRIBUTOR_HOST diff --git a/charts/selenium-grid/templates/session-map-deployment.yaml b/charts/selenium-grid/templates/session-map-deployment.yaml index 496089eaf..8aebdefb2 100644 --- a/charts/selenium-grid/templates/session-map-deployment.yaml +++ b/charts/selenium-grid/templates/session-map-deployment.yaml @@ -29,7 +29,8 @@ spec: containers: - name: {{ template "seleniumGrid.sessionMap.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.sessionMap.imageTag }} - image: {{ printf "%s:%s" .Values.components.sessionMap.imageName $imageTag }} + {{- $imageRegistry := default .Values.global.seleniumGrid.imageRegistry .Values.components.sessionMap.imageRegistry }} + image: {{ printf "%s/%s:%s" $imageRegistry .Values.components.sessionMap.imageName $imageTag }} imagePullPolicy: {{ .Values.components.sessionMap.imagePullPolicy }} {{- with .Values.components.extraEnvironmentVariables }} env: {{- tpl (toYaml .) $ | nindent 12 }} diff --git a/charts/selenium-grid/templates/session-queuer-deployment.yaml b/charts/selenium-grid/templates/session-queuer-deployment.yaml index 28c17b49c..557d6774e 100644 --- a/charts/selenium-grid/templates/session-queuer-deployment.yaml +++ b/charts/selenium-grid/templates/session-queuer-deployment.yaml @@ -29,7 +29,8 @@ spec: containers: - name: {{ template "seleniumGrid.sessionQueue.fullname" . }} {{- $imageTag := default .Values.global.seleniumGrid.imageTag .Values.components.sessionQueue.imageTag }} - image: {{ printf "%s:%s" .Values.components.sessionQueue.imageName $imageTag }} + {{- $imageRegistry := default .Values.global.seleniumGrid.imageRegistry .Values.components.sessionQueue.imageRegistry }} + image: {{ printf "%s/%s:%s" $imageRegistry .Values.components.sessionQueue.imageName $imageTag }} imagePullPolicy: {{ .Values.components.sessionQueue.imagePullPolicy }} {{- with .Values.components.extraEnvironmentVariables }} env: {{- tpl (toYaml .) $ | nindent 12 }} diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 5467674a3..cadf4cee2 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -1,9 +1,13 @@ global: seleniumGrid: + # Image registry for all selenium components + imageRegistry: selenium # Image tag for all selenium components imageTag: 4.15.0-20231128 # Image tag for browser's nodes nodesImageTag: 4.15.0-20231128 + # Image tag for browser's video recorder + videoImageTag: ffmpeg-6.0-20231128 # Pull secret for all components, can be overridden individually imagePullSecret: "" @@ -63,8 +67,9 @@ components: # Configuration for router component router: + # imageRegistry: selenium # Router image name - imageName: selenium/router + imageName: router # Router image tag (this overwrites global.seleniumGrid.imageTag parameter) # imageTag: 4.15.0-20231128 @@ -114,8 +119,9 @@ components: # Configuration for distributor component distributor: + # imageRegistry: selenium # Distributor image name - imageName: selenium/distributor + imageName: distributor # Distributor image tag (this overwrites global.seleniumGrid.imageTag parameter) # imageTag: 4.15.0-20231128 @@ -145,8 +151,9 @@ components: # Configuration for Event Bus component eventBus: + # imageRegistry: selenium # Event Bus image name - imageName: selenium/event-bus + imageName: event-bus # Event Bus image tag (this overwrites global.seleniumGrid.imageTag parameter) # imageTag: 4.15.0-20231128 @@ -180,8 +187,9 @@ components: # Configuration for Session Map component sessionMap: + # imageRegistry: selenium # Session Map image name - imageName: selenium/sessions + imageName: sessions # Session Map image tag (this overwrites global.seleniumGrid.imageTag parameter) # imageTag: 4.15.0-20231128 @@ -210,8 +218,9 @@ components: # Configuration for Session Queue component sessionQueue: + # imageRegistry: selenium # Session Queue image name - imageName: selenium/session-queue + imageName: session-queue # Session Queue image tag (this overwrites global.seleniumGrid.imageTag parameter) # imageTag: 4.15.0-20231128 @@ -260,8 +269,9 @@ components: # Configuration for selenium hub deployment (applied only if `isolateComponents: false`) hub: + # imageRegistry: selenium # Selenium Hub image name - imageName: selenium/hub + imageName: hub # Selenium Hub image tag (this overwrites global.seleniumGrid.imageTag parameter) # imageTag: 4.15.0-20231128 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) @@ -400,8 +410,9 @@ chromeNode: # Number of chrome nodes replicas: 1 + # imageRegistry: selenium # Image of chrome nodes - imageName: selenium/node-chrome + imageName: node-chrome # Image of chrome nodes (this overwrites global.seleniumGrid.nodesImageTag) # imageTag: 4.15.0-20231128 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) @@ -532,8 +543,9 @@ firefoxNode: # Number of firefox nodes replicas: 1 + # imageRegistry: selenium # Image of firefox nodes - imageName: selenium/node-firefox + imageName: node-firefox # Image of firefox nodes (this overwrites global.seleniumGrid.nodesImageTag) # imageTag: 4.15.0-20231128 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) @@ -661,8 +673,9 @@ edgeNode: # Number of edge nodes replicas: 1 + # imageRegistry: selenium # Image of edge nodes - imageName: selenium/node-edge + imageName: node-edge # Image of edge nodes (this overwrites global.seleniumGrid.nodesImageTag) # imageTag: 4.15.0-20231128 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) @@ -779,10 +792,11 @@ edgeNode: videoRecorder: enabled: false + # imageRegistry: selenium # Image of video recorder - imageName: selenium/video + imageName: video # Image of video recorder - imageTag: ffmpeg-6.0-20231128 + # imageTag: ffmpeg-6.0-20231128 # 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/) diff --git a/generate_release_notes.sh b/generate_release_notes.sh index c936c48d4..3dff24e52 100755 --- a/generate_release_notes.sh +++ b/generate_release_notes.sh @@ -11,7 +11,7 @@ echo "" >> release_notes.md echo "### Changelog" > release_notes.md git --no-pager log "${LATEST_TAG}...${HEAD_BRANCH}" --pretty=format:"* [\`%h\`](http://github.com/seleniumhq/docker-selenium/commit/%H) - %s :: %an" --reverse >> release_notes.md -CHROME_VERSION=$(docker run --rm selenium/node-chrome:${TAG_VERSION} google-chrome --version | awk '{print $3}') +CHROME_VERSION=$(docker run --rm selenium/node-chrome:${TAG_VERSION} google-chrome --version | awk '{print $5}') EDGE_VERSION=$(docker run --rm selenium/node-edge:${TAG_VERSION} microsoft-edge --version | awk '{print $3}') CHROMEDRIVER_VERSION=$(docker run --rm selenium/node-chrome:${TAG_VERSION} chromedriver --version | awk '{print $2}') EDGEDRIVER_VERSION=$(docker run --rm selenium/node-edge:${TAG_VERSION} msedgedriver --version | awk '{print $4}') diff --git a/tag_and_push_browser_images.sh b/tag_and_push_browser_images.sh index aa2744e66..305c2588c 100755 --- a/tag_and_push_browser_images.sh +++ b/tag_and_push_browser_images.sh @@ -20,7 +20,7 @@ echo "Tagging images for browser ${BROWSER}, version ${VERSION}, build date ${BU case "${BROWSER}" in chrome) - CHROME_VERSION=$(docker run --rm selenium/node-chrome:${TAG_VERSION} google-chrome --version | awk '{print $3}') + CHROME_VERSION=$(docker run --rm selenium/node-chrome:${TAG_VERSION} google-chrome --version | awk '{print $5}') echo "Chrome version -> "${CHROME_VERSION} CHROME_SHORT_VERSION="$(short_version ${CHROME_VERSION})" echo "Short Chrome version -> "${CHROME_SHORT_VERSION} diff --git a/tests/K8s/chart_cluster_setup.sh b/tests/K8s/chart_cluster_setup.sh index cfddcd754..b46231449 100755 --- a/tests/K8s/chart_cluster_setup.sh +++ b/tests/K8s/chart_cluster_setup.sh @@ -23,9 +23,10 @@ cleanup() { # Function to be executed on command failure on_failure() { - echo "There is step failed with exit status $?" + local exit_status=$? + echo "There is step failed with exit status $exit_status" cleanup - exit $? + exit $exit_status } # Trap ERR signal and call on_failure function diff --git a/tests/K8s/chart_install.sh b/tests/K8s/chart_install.sh index a19113395..7fb7a0cb5 100755 --- a/tests/K8s/chart_install.sh +++ b/tests/K8s/chart_install.sh @@ -15,7 +15,8 @@ MATRIX_BROWSER=${1:-"NodeChrome"} SELENIUM_GRID_AUTOSCALING=${2:-"true"} SELENIUM_GRID_AUTOSCALING_MIN_REPLICA=${3:-"0"} WAIT_TIMEOUT=${WAIT_TIMEOUT:-"90s"} -SLEEP_INTERVAL=${SLEEP_INTERVAL:-45} +HUB_CHECKS_INTERVAL=${HUB_CHECKS_INTERVAL:-45} +WEB_DRIVER_WAIT_TIMEOUT=${WEB_DRIVER_WAIT_TIMEOUT:-120} SKIP_CLEANUP=${SKIP_CLEANUP:-"false"} # For debugging purposes, retain the cluster after the test run cleanup() { @@ -28,9 +29,12 @@ cleanup() { # Function to be executed on command failure on_failure() { - echo "There is step failed with exit status $?" + local exit_status=$? + echo "Describe all resources in the ${SELENIUM_NAMESPACE} namespace for debugging purposes" + kubectl describe all -n ${SELENIUM_NAMESPACE} + echo "There is step failed with exit status $exit_status" cleanup - exit $? + exit $exit_status } # Trap ERR signal and call on_failure function @@ -43,19 +47,23 @@ helm upgrade --install ${RELEASE_NAME} \ -f ${TEST_VALUES_PATH}/${MATRIX_BROWSER}-values.yaml \ --set autoscaling.enableWithExistingKEDA=${SELENIUM_GRID_AUTOSCALING} \ --set autoscaling.scaledOptions.minReplicaCount=${SELENIUM_GRID_AUTOSCALING_MIN_REPLICA} \ ---set global.seleniumGrid.imageTag=${VERSION} \ +--set global.seleniumGrid.imageTag=${VERSION} --set global.seleniumGrid.imageRegistry=${NAMESPACE} \ ${CHART_PATH} --namespace ${SELENIUM_NAMESPACE} --create-namespace -echo "Verify Post Deployment Grid Health and Pod Status" -kubectl get pods -n ${SELENIUM_NAMESPACE} - echo "Run Tests" export SELENIUM_GRID_HOST=${SELENIUM_GRID_HOST} export SELENIUM_GRID_PORT=${SELENIUM_GRID_PORT}""${SUB_PATH} export SELENIUM_GRID_AUTOSCALING=${SELENIUM_GRID_AUTOSCALING} export SELENIUM_GRID_AUTOSCALING_MIN_REPLICA=${SELENIUM_GRID_AUTOSCALING_MIN_REPLICA} export RUN_IN_DOCKER_COMPOSE=true -export SLEEP_INTERVAL=${SLEEP_INTERVAL} +export HUB_CHECKS_INTERVAL=${HUB_CHECKS_INTERVAL} +export WEB_DRIVER_WAIT_TIMEOUT=${WEB_DRIVER_WAIT_TIMEOUT} ./tests/bootstrap.sh ${MATRIX_BROWSER} +echo "Get pods status" +kubectl get pods -n ${SELENIUM_NAMESPACE} + +echo "Get all resources in the ${SELENIUM_NAMESPACE} namespace" +kubectl get all -n ${SELENIUM_NAMESPACE} + cleanup diff --git a/tests/K8s/chart_lint.sh b/tests/K8s/chart_lint.sh index 25cd5df49..09c46edc1 100755 --- a/tests/K8s/chart_lint.sh +++ b/tests/K8s/chart_lint.sh @@ -1,8 +1,9 @@ #!/bin/bash # Function to be executed on command failure on_failure() { - echo "There is step failed with exit status $?" - exit $? + local exit_status=$? + echo "There is step failed with exit status $exit_status" + exit $exit_status } # Trap ERR signal and call on_failure function diff --git a/tests/K8s/chart_setup_env.sh b/tests/K8s/chart_setup_env.sh index c4bf6e3bc..8c77101bf 100755 --- a/tests/K8s/chart_setup_env.sh +++ b/tests/K8s/chart_setup_env.sh @@ -1,8 +1,9 @@ #!/bin/bash # Function to be executed on command failure on_failure() { - echo "There is step failed with exit status $?" - exit $? + local exit_status=$? + echo "There is step failed with exit status $exit_status" + exit $exit_status } # Trap ERR signal and call on_failure function diff --git a/tests/SeleniumTests/__init__.py b/tests/SeleniumTests/__init__.py index fb6308308..ef6e9bada 100644 --- a/tests/SeleniumTests/__init__.py +++ b/tests/SeleniumTests/__init__.py @@ -10,6 +10,7 @@ SELENIUM_GRID_HOST = os.environ.get('SELENIUM_GRID_HOST', 'localhost') SELENIUM_GRID_PORT = os.environ.get('SELENIUM_GRID_PORT', '4444') +WEB_DRIVER_WAIT_TIMEOUT = int(os.environ.get('WEB_DRIVER_WAIT_TIMEOUT', 60)) class SeleniumGenericTests(unittest.TestCase): @@ -51,7 +52,7 @@ def test_visit_basic_auth_secured_page(self): def test_play_video(self): driver = self.driver driver.get('https://hls-js.netlify.com/demo/') - wait = WebDriverWait(driver, 30) + wait = WebDriverWait(driver, WEB_DRIVER_WAIT_TIMEOUT) video = wait.until( EC.element_to_be_clickable((By.TAG_NAME, 'video')) ) diff --git a/tests/SmokeTests/__init__.py b/tests/SmokeTests/__init__.py index 2e5ef768b..a2f74c7fa 100644 --- a/tests/SmokeTests/__init__.py +++ b/tests/SmokeTests/__init__.py @@ -12,13 +12,14 @@ SELENIUM_GRID_PORT = os.environ.get('SELENIUM_GRID_PORT', '4444') SELENIUM_GRID_AUTOSCALING = os.environ.get('SELENIUM_GRID_AUTOSCALING', 'false') SELENIUM_GRID_AUTOSCALING_MIN_REPLICA = os.environ.get('SELENIUM_GRID_AUTOSCALING_MIN_REPLICA', 0) -SLEEP_INTERVAL = os.environ.get('SLEEP_INTERVAL', 3) +HUB_CHECKS_MAX_ATTEMPTS = os.environ.get('HUB_CHECKS_MAX_ATTEMPTS', 3) +HUB_CHECKS_INTERVAL = os.environ.get('HUB_CHECKS_INTERVAL', 10) class SmokeTests(unittest.TestCase): def smoke_test_container(self, port): current_attempts = 0 - max_attempts = 3 - sleep_interval = int(SLEEP_INTERVAL) + max_attempts = int(HUB_CHECKS_MAX_ATTEMPTS) + sleep_interval = int(HUB_CHECKS_INTERVAL) status_fetched = False status_json = None auto_scaling = SELENIUM_GRID_AUTOSCALING == 'true'