From 1232462b3a23da95279798b1a4b3a711beb4989a Mon Sep 17 00:00:00 2001 From: Bruno Silva Date: Mon, 17 Jul 2023 13:35:32 +0200 Subject: [PATCH] Support to nodes livenessProbe into the Helm Chart In the Helm Chart, there was no ```livenessProbe``` support for option ```chromeNode```, ```firefoxNode```, and ```edgeNode```. This commit adds these three Helm Chart values: - ```chromeNode.livenessProbe: {}``` - ```firefoxNode.livenessProbe {}``` - ```edgeNode.livenessProbe: {}``` The bellow properties will end up in the pod livenessProbe for the respective node pod. Fixes #1895 --- charts/selenium-grid/README.md | 667 ++++----- charts/selenium-grid/templates/_helpers.tpl | 419 +++--- charts/selenium-grid/values.yaml | 1358 ++++++++++--------- 3 files changed, 1231 insertions(+), 1213 deletions(-) diff --git a/charts/selenium-grid/README.md b/charts/selenium-grid/README.md index e81dbe6bda..18f3403706 100644 --- a/charts/selenium-grid/README.md +++ b/charts/selenium-grid/README.md @@ -1,332 +1,335 @@ -# Selenium-Grid Helm Chart - -This chart enables the creation of a Selenium Grid Server in Kubernetes. - -## Installing the chart - -If you want to install the latest master version of Selenium Grid onto your cluster you can do that by using the helm charts repository located at https://www.selenium.dev/docker-selenium. - -```bash -# Add docker-selenium helm repository -helm repo add docker-selenium https://www.selenium.dev/docker-selenium - -# Update charts from docker-selenium repo -helm repo update - -# List all versions present in the docker-selenium repo -helm search repo docker-selenium --versions - -# Install basic grid latest version -helm install selenium-grid docker-selenium/selenium-grid - -# Or install full grid (Router, Distributor, EventBus, SessionMap and SessionQueue components separated) -helm install selenium-grid docker-selenium/selenium-grid --set isolateComponents=true - -# Or install specified version -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/. -``` - -## Enable Selenium Grid Autoscaling - -Selenium Grid has the ability to autoscale browser nodes up/down based on the pending requests in the -session queue. - -To do this [KEDA](https://keda.sh/docs/2.10/scalers/selenium-grid-scaler/) is used. When enabling -autoscaling using `autoscaling.enabling` KEDA is installed automatically. To instead use an existing -installation of KEDA you can enable autoscaling with `autoscaling.enableWithExistingKEDA` instead. - -KEDA can scale either with -[deployments](https://keda.sh/docs/2.10/concepts/scaling-deployments/#scaling-of-deployments-and-statefulsets) -or [jobs](https://keda.sh/docs/2.10/concepts/scaling-jobs/) and the charts support both types. This -chart support both modes. It is controlled with `autoscaling.scalingType` that can be set to either -job (default) or deployment. - -### Settings when scaling with deployments - -The `terminationGracePeriodSeconds` is set to 30 seconds by default. When scaling using deployments -the HPA choose pods to terminate randomly. If the chosen pod is currently executing a test rather -than being idle, then there is 30 seconds before the test is expected to complete. If your test is -still executing after 30 seconds, it would result in failure as the pod will be killed. If you want -to give more time for your tests to complete, you may set `terminationGracePeriodSeconds` to value -upto 3600 seconds. - -## Updating Selenium-Grid release - -Once you have a new chart version, you can update your selenium-grid running: - -```bash -helm upgrade selenium-grid docker-selenium/selenium-grid -``` - -## Uninstalling Selenium Grid release - -To uninstall: - -```bash -helm uninstall selenium-grid -``` - -## Configuration - -For now, global configuration supported is: - -| Parameter | Default | Description | -| ----------------------------------- | ---------------------------------- | ------------------------------------- | -| `global.seleniumGrid.imageTag` | `4.10.0-20230607` | Image tag for all selenium components | -| `global.seleniumGrid.nodesImageTag` | `4.10.0-20230607` | 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 | -| `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 | -| `chromeNode.imageName` | `selenium/node-chrome` | Image of chrome nodes | -| `chromeNode.imageTag` | `4.10.0-20230607` | 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.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 | -| `firefoxNode.enabled` | `true` | Enable firefox nodes | -| `firefoxNode.deploymentEnabled` | `true` | Enable creation of Deployment for firefox nodes | -| `firefoxNode.replicas` | `1` | Number of firefox nodes | -| `firefoxNode.imageName` | `selenium/node-firefox` | Image of firefox nodes | -| `firefoxNode.imageTag` | `4.10.0-20230607` | 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.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 | -| `edgeNode.enabled` | `true` | Enable edge nodes | -| `edgeNode.deploymentEnabled` | `true` | Enable creation of Deployment for edge nodes | -| `edgeNode.replicas` | `1` | Number of edge nodes | -| `edgeNode.imageName` | `selenium/node-edge` | Image of edge nodes | -| `edgeNode.imageTag` | `4.10.0-20230607` | 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.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 | -| `customLabels` | `{}` | Custom labels for k8s resources | -| `customLabels` | `{}` | Custom labels for k8s resources | - - -### Configuration of KEDA - -If you are setting `autoscaling.enabled` to `true` KEDA is installed and can be configured with -values with the prefix `keda`. So you can for example set `keda.prometheus.metricServer.enabled` to -`true` to enable the metrics server for KEDA. See -https://github.com/kedacore/charts/blob/main/keda/README.md for more details. - -### Configuration for Selenium-Hub - -You can configure the Selenium Hub with this values: - -| Parameter | Default | Description | -|---------------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| -| `hub.imageName` | `selenium/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) | -| `hub.annotations` | `{}` | Custom annotations for Selenium Hub pod | -| `hub.labels` | `{}` | Custom labels for Selenium Hub pod | -| `hub.publishPort` | `4442` | Port where events are published | -| `hub.subscribePort` | `4443` | Port where to subscribe for events | -| `hub.port` | `4444` | Selenium Hub port | -| `hub.livenessProbe` | `See values.yaml` | Liveness probe settings | -| `hub.readinessProbe` | `See values.yaml` | Readiness probe settings | -| `hub.tolerations` | `[]` | Tolerations for selenium-hub pods | -| `hub.nodeSelector` | `{}` | Node Selector for selenium-hub pods | -| `hub.affinity` | `{}` | Affinity for selenium-hub pods | -| `hub.priorityClassName` | `""` | Priority class name for selenium-hub pods | -| `hub.subPath` | `/` | Custom sub path for the hub deployment | -| `hub.extraEnvironmentVariables` | `nil` | Custom environment variables for selenium-hub | -| `hub.extraEnvFrom` | `nil` | Custom environment variables for selenium taken from `configMap` or `secret`-hub | -| `hub.resources` | `{}` | Resources for selenium-hub container | -| `hub.securityContext` | `See values.yaml` | Security context for selenium-hub container | -| `hub.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| `hub.loadBalancerIP` | `nil` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) | -| `hub.serviceAnnotations` | `{}` | Custom annotations for Selenium Hub service | - - -### Configuration for isolated components - -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 | - -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. +# Selenium-Grid Helm Chart + +This chart enables the creation of a Selenium Grid Server in Kubernetes. + +## Installing the chart + +If you want to install the latest master version of Selenium Grid onto your cluster you can do that by using the helm charts repository located at https://www.selenium.dev/docker-selenium. + +```bash +# Add docker-selenium helm repository +helm repo add docker-selenium https://www.selenium.dev/docker-selenium + +# Update charts from docker-selenium repo +helm repo update + +# List all versions present in the docker-selenium repo +helm search repo docker-selenium --versions + +# Install basic grid latest version +helm install selenium-grid docker-selenium/selenium-grid + +# Or install full grid (Router, Distributor, EventBus, SessionMap and SessionQueue components separated) +helm install selenium-grid docker-selenium/selenium-grid --set isolateComponents=true + +# Or install specified version +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/. +``` + +## Enable Selenium Grid Autoscaling + +Selenium Grid has the ability to autoscale browser nodes up/down based on the pending requests in the +session queue. + +To do this [KEDA](https://keda.sh/docs/2.10/scalers/selenium-grid-scaler/) is used. When enabling +autoscaling using `autoscaling.enabling` KEDA is installed automatically. To instead use an existing +installation of KEDA you can enable autoscaling with `autoscaling.enableWithExistingKEDA` instead. + +KEDA can scale either with +[deployments](https://keda.sh/docs/2.10/concepts/scaling-deployments/#scaling-of-deployments-and-statefulsets) +or [jobs](https://keda.sh/docs/2.10/concepts/scaling-jobs/) and the charts support both types. This +chart support both modes. It is controlled with `autoscaling.scalingType` that can be set to either +job (default) or deployment. + +### Settings when scaling with deployments + +The `terminationGracePeriodSeconds` is set to 30 seconds by default. When scaling using deployments +the HPA choose pods to terminate randomly. If the chosen pod is currently executing a test rather +than being idle, then there is 30 seconds before the test is expected to complete. If your test is +still executing after 30 seconds, it would result in failure as the pod will be killed. If you want +to give more time for your tests to complete, you may set `terminationGracePeriodSeconds` to value +upto 3600 seconds. + +## Updating Selenium-Grid release + +Once you have a new chart version, you can update your selenium-grid running: + +```bash +helm upgrade selenium-grid docker-selenium/selenium-grid +``` + +## Uninstalling Selenium Grid release + +To uninstall: + +```bash +helm uninstall selenium-grid +``` + +## Configuration + +For now, global configuration supported is: + +| Parameter | Default | Description | +| ----------------------------------- | ---------------------------------- | ------------------------------------- | +| `global.seleniumGrid.imageTag` | `4.10.0-20230607` | Image tag for all selenium components | +| `global.seleniumGrid.nodesImageTag` | `4.10.0-20230607` | 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 | +| `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 | +| `chromeNode.imageName` | `selenium/node-chrome` | Image of chrome nodes | +| `chromeNode.imageTag` | `4.10.0-20230607` | 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 | +| `firefoxNode.enabled` | `true` | Enable firefox nodes | +| `firefoxNode.deploymentEnabled` | `true` | Enable creation of Deployment for firefox nodes | +| `firefoxNode.replicas` | `1` | Number of firefox nodes | +| `firefoxNode.imageName` | `selenium/node-firefox` | Image of firefox nodes | +| `firefoxNode.imageTag` | `4.10.0-20230607` | 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 | +| `edgeNode.enabled` | `true` | Enable edge nodes | +| `edgeNode.deploymentEnabled` | `true` | Enable creation of Deployment for edge nodes | +| `edgeNode.replicas` | `1` | Number of edge nodes | +| `edgeNode.imageName` | `selenium/node-edge` | Image of edge nodes | +| `edgeNode.imageTag` | `4.10.0-20230607` | 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 | +| `customLabels` | `{}` | Custom labels for k8s resources | +| `customLabels` | `{}` | Custom labels for k8s resources | + + +### Configuration of KEDA + +If you are setting `autoscaling.enabled` to `true` KEDA is installed and can be configured with +values with the prefix `keda`. So you can for example set `keda.prometheus.metricServer.enabled` to +`true` to enable the metrics server for KEDA. See +https://github.com/kedacore/charts/blob/main/keda/README.md for more details. + +### Configuration for Selenium-Hub + +You can configure the Selenium Hub with this values: + +| Parameter | Default | Description | +|---------------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| +| `hub.imageName` | `selenium/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) | +| `hub.annotations` | `{}` | Custom annotations for Selenium Hub pod | +| `hub.labels` | `{}` | Custom labels for Selenium Hub pod | +| `hub.publishPort` | `4442` | Port where events are published | +| `hub.subscribePort` | `4443` | Port where to subscribe for events | +| `hub.port` | `4444` | Selenium Hub port | +| `hub.livenessProbe` | `See values.yaml` | Liveness probe settings | +| `hub.readinessProbe` | `See values.yaml` | Readiness probe settings | +| `hub.tolerations` | `[]` | Tolerations for selenium-hub pods | +| `hub.nodeSelector` | `{}` | Node Selector for selenium-hub pods | +| `hub.affinity` | `{}` | Affinity for selenium-hub pods | +| `hub.priorityClassName` | `""` | Priority class name for selenium-hub pods | +| `hub.subPath` | `/` | Custom sub path for the hub deployment | +| `hub.extraEnvironmentVariables` | `nil` | Custom environment variables for selenium-hub | +| `hub.extraEnvFrom` | `nil` | Custom environment variables for selenium taken from `configMap` or `secret`-hub | +| `hub.resources` | `{}` | Resources for selenium-hub container | +| `hub.securityContext` | `See values.yaml` | Security context for selenium-hub container | +| `hub.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | +| `hub.loadBalancerIP` | `nil` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) | +| `hub.serviceAnnotations` | `{}` | Custom annotations for Selenium Hub service | + + +### Configuration for isolated components + +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 | + +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/templates/_helpers.tpl b/charts/selenium-grid/templates/_helpers.tpl index 25d0577fb9..8d050cbc51 100644 --- a/charts/selenium-grid/templates/_helpers.tpl +++ b/charts/selenium-grid/templates/_helpers.tpl @@ -1,208 +1,211 @@ -{{/* -Common labels -*/}} -{{- define "seleniumGrid.commonLabels" -}} -app.kubernetes.io/managed-by: {{ .Release.Service | lower }} -app.kubernetes.io/instance: {{ .Release.Name }} -app.kubernetes.io/version: {{ .Chart.AppVersion }} -app.kubernetes.io/component: {{ printf "selenium-grid-%s" .Chart.AppVersion }} -helm.sh/chart: {{ printf "%s-%s" .Chart.Name (.Chart.Version | replace "+" "_") }} -{{- end -}} - -{{/* -Selenium Hub fullname -*/}} -{{- define "seleniumGrid.hub.fullname" -}} -{{- default "selenium-hub" .Values.hub.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Event bus fullname -*/}} -{{- define "seleniumGrid.eventBus.fullname" -}} -{{- default "selenium-event-bus" .Values.components.eventBus.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Router fullname -*/}} -{{- define "seleniumGrid.router.fullname" -}} -{{- default "selenium-router" .Values.components.router.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Distributor fullname -*/}} -{{- define "seleniumGrid.distributor.fullname" -}} -{{- default "selenium-distributor" .Values.components.distributor.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -SessionMap fullname -*/}} -{{- define "seleniumGrid.sessionMap.fullname" -}} -{{- default "selenium-session-map" .Values.components.sessionMap.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -SessionQueue fullname -*/}} -{{- define "seleniumGrid.sessionQueue.fullname" -}} -{{- default "selenium-session-queue" .Values.components.sessionQueue.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Chrome node fullname -*/}} -{{- define "seleniumGrid.chromeNode.fullname" -}} -{{- default "selenium-chrome-node" .Values.chromeNode.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Firefox node fullname -*/}} -{{- define "seleniumGrid.firefoxNode.fullname" -}} -{{- default "selenium-firefox-node" .Values.firefoxNode.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Edge node fullname -*/}} -{{- define "seleniumGrid.edgeNode.fullname" -}} -{{- default "selenium-edge-node" .Values.edgeNode.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - - -{{/* -Ingress fullname -*/}} -{{- define "seleniumGrid.ingress.fullname" -}} -{{- default "selenium-ingress" .Values.ingress.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Is autoscaling using KEDA enabled -*/}} -{{- define "seleniumGrid.useKEDA" -}} -{{- or .Values.autoscaling.enabled .Values.autoscaling.enableWithExistingKEDA | ternary "true" "" -}} -{{- end -}} - - -{{/* -Common pod template -*/}} -{{- define "seleniumGrid.podTemplate" -}} -template: - metadata: - labels: - app: {{.name}} - app.kubernetes.io/name: {{.name}} - {{- include "seleniumGrid.commonLabels" . | nindent 6 }} - {{- with .node.labels }} - {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.customLabels }} - {{- toYaml . | nindent 6 }} - {{- end }} - annotations: - checksum/event-bus-configmap: {{ include (print $.Template.BasePath "/event-bus-configmap.yaml") . | sha256sum }} - {{- with .node.annotations }} - {{ toYaml . | nindent 6 }} - {{- end }} - spec: - restartPolicy: {{ and (eq (include "seleniumGrid.useKEDA" .) "true") (eq .Values.autoscaling.scalingType "job") | ternary "Never" "Always" }} - {{- with .node.hostAliases }} - hostAliases: {{ toYaml . | nindent 6 }} - {{- end }} - containers: - - name: {{.name}} - {{- $imageTag := default .Values.global.seleniumGrid.nodesImageTag .node.imageTag }} - image: {{ printf "%s:%s" .node.imageName $imageTag }} - imagePullPolicy: {{ .node.imagePullPolicy }} - {{- with .node.extraEnvironmentVariables }} - env: {{- tpl (toYaml .) $ | nindent 10 }} - {{- end }} - envFrom: - - configMapRef: - name: {{ .Values.busConfigMap.name }} - - configMapRef: - name: {{ .Values.nodeConfigMap.name }} - {{- with .node.extraEnvFrom }} - {{- toYaml . | nindent 10 }} - {{- end }} - {{- if gt (len .node.ports) 0 }} - ports: - {{- range .node.ports }} - - containerPort: {{ . }} - protocol: TCP - {{- end }} - {{- end }} - volumeMounts: - - name: dshm - mountPath: /dev/shm - {{- if .node.extraVolumeMounts }} - {{- toYaml .node.extraVolumeMounts | nindent 10 }} - {{- end }} - {{- with .node.resources }} - resources: {{- toYaml . | nindent 10 }} - {{- end }} - {{- include "seleniumGrid.lifecycle" . | nindent 8 -}} - {{- with .node.startupProbe }} - startupProbe: {{- toYaml . | nindent 10 }} - {{- end }} - {{- if or .Values.global.seleniumGrid.imagePullSecret .node.imagePullSecret }} - imagePullSecrets: - - name: {{ default .Values.global.seleniumGrid.imagePullSecret .node.imagePullSecret }} - {{- end }} - {{- with .node.nodeSelector }} - nodeSelector: {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .node.tolerations }} - tolerations: - {{ toYaml . | nindent 4 }} - {{- end }} - {{- with .node.priorityClassName }} - priorityClassName: {{ . }} - {{- end }} - terminationGracePeriodSeconds: {{ .node.terminationGracePeriodSeconds }} - volumes: - - name: dshm - emptyDir: - medium: Memory - sizeLimit: {{ default "1Gi" .node.dshmVolumeSizeLimit }} - {{- if .node.extraVolumes }} - {{ toYaml .node.extraVolumes | nindent 6 }} - {{- end }} -{{- end -}} - -{{/* -Get the url of the grid. If the external url can be figured out from the ingress use that, otherwise the cluster internal url -*/}} -{{- define "seleniumGrid.url" -}} -{{- if and .Values.ingress.enabled .Values.ingress.hostname (ne .Values.ingress.hostname "selenium-grid.local") -}} -http{{if .Values.ingress.tls}}s{{end}}://{{.Values.ingress.hostname}} -{{- else -}} -http://{{ include ($.Values.isolateComponents | ternary "seleniumGrid.router.fullname" "seleniumGrid.hub.fullname") $ }}.{{ .Release.Namespace }}:{{ $.Values.components.router.port }} -{{- end }} -{{- end -}} - -{{/* -Graphql Url of the hub or the router -*/}} -{{- define "seleniumGrid.graphqlURL" -}} -http://{{ include ($.Values.isolateComponents | ternary "seleniumGrid.router.fullname" "seleniumGrid.hub.fullname") $ }}.{{ .Release.Namespace }}:{{ $.Values.components.router.port }}/graphql -{{- end -}} - -{{/* -Get the lifecycle of the pod. When KEDA is activated and the lifecycle is used for a pod of a -deployment preStop hook to deregister from the selenium hub. -*/}} -{{- define "seleniumGrid.lifecycle" }} -{{ $lifecycle := tpl (toYaml (default (dict) .node.lifecycle)) $ }} -{{- if and (eq .Values.autoscaling.scalingType "deployment") (eq (include "seleniumGrid.useKEDA" .) "true") -}} -{{ $lifecycle = merge ($lifecycle | fromYaml ) .Values.autoscaling.deregisterLifecycle | toYaml }} -{{- end -}} -{{ if and $lifecycle (ne $lifecycle "{}") -}} -lifecycle: {{ $lifecycle | nindent 2 }} -{{- end -}} -{{- end -}} +{{/* +Common labels +*/}} +{{- define "seleniumGrid.commonLabels" -}} +app.kubernetes.io/managed-by: {{ .Release.Service | lower }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/version: {{ .Chart.AppVersion }} +app.kubernetes.io/component: {{ printf "selenium-grid-%s" .Chart.AppVersion }} +helm.sh/chart: {{ printf "%s-%s" .Chart.Name (.Chart.Version | replace "+" "_") }} +{{- end -}} + +{{/* +Selenium Hub fullname +*/}} +{{- define "seleniumGrid.hub.fullname" -}} +{{- default "selenium-hub" .Values.hub.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Event bus fullname +*/}} +{{- define "seleniumGrid.eventBus.fullname" -}} +{{- default "selenium-event-bus" .Values.components.eventBus.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Router fullname +*/}} +{{- define "seleniumGrid.router.fullname" -}} +{{- default "selenium-router" .Values.components.router.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Distributor fullname +*/}} +{{- define "seleniumGrid.distributor.fullname" -}} +{{- default "selenium-distributor" .Values.components.distributor.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +SessionMap fullname +*/}} +{{- define "seleniumGrid.sessionMap.fullname" -}} +{{- default "selenium-session-map" .Values.components.sessionMap.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +SessionQueue fullname +*/}} +{{- define "seleniumGrid.sessionQueue.fullname" -}} +{{- default "selenium-session-queue" .Values.components.sessionQueue.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Chrome node fullname +*/}} +{{- define "seleniumGrid.chromeNode.fullname" -}} +{{- default "selenium-chrome-node" .Values.chromeNode.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Firefox node fullname +*/}} +{{- define "seleniumGrid.firefoxNode.fullname" -}} +{{- default "selenium-firefox-node" .Values.firefoxNode.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Edge node fullname +*/}} +{{- define "seleniumGrid.edgeNode.fullname" -}} +{{- default "selenium-edge-node" .Values.edgeNode.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{/* +Ingress fullname +*/}} +{{- define "seleniumGrid.ingress.fullname" -}} +{{- default "selenium-ingress" .Values.ingress.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Is autoscaling using KEDA enabled +*/}} +{{- define "seleniumGrid.useKEDA" -}} +{{- or .Values.autoscaling.enabled .Values.autoscaling.enableWithExistingKEDA | ternary "true" "" -}} +{{- end -}} + + +{{/* +Common pod template +*/}} +{{- define "seleniumGrid.podTemplate" -}} +template: + metadata: + labels: + app: {{.name}} + app.kubernetes.io/name: {{.name}} + {{- include "seleniumGrid.commonLabels" . | nindent 6 }} + {{- with .node.labels }} + {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .Values.customLabels }} + {{- toYaml . | nindent 6 }} + {{- end }} + annotations: + checksum/event-bus-configmap: {{ include (print $.Template.BasePath "/event-bus-configmap.yaml") . | sha256sum }} + {{- with .node.annotations }} + {{ toYaml . | nindent 6 }} + {{- end }} + spec: + restartPolicy: {{ and (eq (include "seleniumGrid.useKEDA" .) "true") (eq .Values.autoscaling.scalingType "job") | ternary "Never" "Always" }} + {{- with .node.hostAliases }} + hostAliases: {{ toYaml . | nindent 6 }} + {{- end }} + containers: + - name: {{.name}} + {{- $imageTag := default .Values.global.seleniumGrid.nodesImageTag .node.imageTag }} + image: {{ printf "%s:%s" .node.imageName $imageTag }} + imagePullPolicy: {{ .node.imagePullPolicy }} + {{- with .node.extraEnvironmentVariables }} + env: {{- tpl (toYaml .) $ | nindent 10 }} + {{- end }} + envFrom: + - configMapRef: + name: {{ .Values.busConfigMap.name }} + - configMapRef: + name: {{ .Values.nodeConfigMap.name }} + {{- with .node.extraEnvFrom }} + {{- toYaml . | nindent 10 }} + {{- end }} + {{- if gt (len .node.ports) 0 }} + ports: + {{- range .node.ports }} + - containerPort: {{ . }} + protocol: TCP + {{- end }} + {{- end }} + volumeMounts: + - name: dshm + mountPath: /dev/shm + {{- if .node.extraVolumeMounts }} + {{- toYaml .node.extraVolumeMounts | nindent 10 }} + {{- end }} + {{- with .node.resources }} + resources: {{- toYaml . | nindent 10 }} + {{- end }} + {{- include "seleniumGrid.lifecycle" . | nindent 8 -}} + {{- with .node.startupProbe }} + startupProbe: {{- toYaml . | nindent 10 }} + {{- end }} + {{- with .node.livenessProbe }} + livenessProbe: {{- toYaml . | nindent 10 }} + {{- end }} + {{- if or .Values.global.seleniumGrid.imagePullSecret .node.imagePullSecret }} + imagePullSecrets: + - name: {{ default .Values.global.seleniumGrid.imagePullSecret .node.imagePullSecret }} + {{- end }} + {{- with .node.nodeSelector }} + nodeSelector: {{- toYaml . | nindent 6 }} + {{- end }} + {{- with .node.tolerations }} + tolerations: + {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .node.priorityClassName }} + priorityClassName: {{ . }} + {{- end }} + terminationGracePeriodSeconds: {{ .node.terminationGracePeriodSeconds }} + volumes: + - name: dshm + emptyDir: + medium: Memory + sizeLimit: {{ default "1Gi" .node.dshmVolumeSizeLimit }} + {{- if .node.extraVolumes }} + {{ toYaml .node.extraVolumes | nindent 6 }} + {{- end }} +{{- end -}} + +{{/* +Get the url of the grid. If the external url can be figured out from the ingress use that, otherwise the cluster internal url +*/}} +{{- define "seleniumGrid.url" -}} +{{- if and .Values.ingress.enabled .Values.ingress.hostname (ne .Values.ingress.hostname "selenium-grid.local") -}} +http{{if .Values.ingress.tls}}s{{end}}://{{.Values.ingress.hostname}} +{{- else -}} +http://{{ include ($.Values.isolateComponents | ternary "seleniumGrid.router.fullname" "seleniumGrid.hub.fullname") $ }}.{{ .Release.Namespace }}:{{ $.Values.components.router.port }} +{{- end }} +{{- end -}} + +{{/* +Graphql Url of the hub or the router +*/}} +{{- define "seleniumGrid.graphqlURL" -}} +http://{{ include ($.Values.isolateComponents | ternary "seleniumGrid.router.fullname" "seleniumGrid.hub.fullname") $ }}.{{ .Release.Namespace }}:{{ $.Values.components.router.port }}/graphql +{{- end -}} + +{{/* +Get the lifecycle of the pod. When KEDA is activated and the lifecycle is used for a pod of a +deployment preStop hook to deregister from the selenium hub. +*/}} +{{- define "seleniumGrid.lifecycle" }} +{{ $lifecycle := tpl (toYaml (default (dict) .node.lifecycle)) $ }} +{{- if and (eq .Values.autoscaling.scalingType "deployment") (eq (include "seleniumGrid.useKEDA" .) "true") -}} +{{ $lifecycle = merge ($lifecycle | fromYaml ) .Values.autoscaling.deregisterLifecycle | toYaml }} +{{- end -}} +{{ if and $lifecycle (ne $lifecycle "{}") -}} +lifecycle: {{ $lifecycle | nindent 2 }} +{{- end -}} +{{- end -}} diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index d51c3d2582..c234998fb7 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -1,673 +1,685 @@ -global: - seleniumGrid: - # Image tag for all selenium components - imageTag: 4.10.0-20230607 - # Image tag for browser's nodes - nodesImageTag: 4.10.0-20230607 - # Pull secret for all components, can be overridden individually - imagePullSecret: "" - -# Deploy Router, Distributor, EventBus, SessionMap and Nodes separately -isolateComponents: false - -# Configure the ingress resource to access the Grid installation. -ingress: - # Enable or disable ingress resource - enabled: true - # Name of ingress class to select which controller will implement ingress resource - className: "" - # Custom annotations for ingress resource - annotations: {} - # Default host for the ingress resource - hostname: selenium-grid.local - # Default host path for the ingress resource - path: / - # TLS backend configuration for ingress resource - tls: [] - path: / - -# ConfigMap that contains SE_EVENT_BUS_HOST, SE_EVENT_BUS_PUBLISH_PORT and SE_EVENT_BUS_SUBSCRIBE_PORT variables -busConfigMap: - # Name of the configmap - name: selenium-event-bus-config - # Custom annotations for configmap - annotations: {} - -# ConfigMap that contains common environment variables for browser nodes -nodeConfigMap: - name: selenium-node-config - # Custom annotations for configmap - annotations: {} - -# Configuration for isolated components (applied only if `isolateComponents: true`) -components: - - # Configuration for router component - router: - # Router image name - imageName: selenium/router - # Router image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.10.0-20230607 - - # 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/) - imagePullSecret: "" - - # Custom annotations for router pods - annotations: {} - # Router port - port: 4444 - # Liveness probe settings - livenessProbe: - enabled: true - path: /readyz - initialDelaySeconds: 10 - failureThreshold: 10 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - # Readiness probe settings - readinessProbe: - enabled: true - path: /readyz - initialDelaySeconds: 12 - failureThreshold: 10 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - # Resources for router container - resources: {} - # SecurityContext for router container - securityContext: {} - # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) - serviceType: ClusterIP - # Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) - loadBalancerIP: "" - # Custom annotations for router service - serviceAnnotations: {} - # Tolerations for router pods - tolerations: [] - # Node selector for router pods - nodeSelector: {} - # Priority class name for router pods - priorityClassName: "" - - # Configuration for distributor component - distributor: - # Distributor image name - imageName: selenium/distributor - # Distributor image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.10.0-20230607 - - # 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/) - imagePullSecret: "" - - # Custom annotations for Distributor pods - annotations: {} - # Distributor port - port: 5553 - # Resources for Distributor container - resources: {} - # SecurityContext for Distributor container - securityContext: {} - # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) - serviceType: ClusterIP - # Custom annotations for Distributor service - serviceAnnotations: {} - # Tolerations for Distributor pods - tolerations: [] - # Node selector for Distributor pods - nodeSelector: {} - # Priority class name for Distributor pods - priorityClassName: "" - - # Configuration for Event Bus component - eventBus: - # Event Bus image name - imageName: selenium/event-bus - # Event Bus image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.10.0-20230607 - - # 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/) - imagePullSecret: "" - - # Custom annotations for Event Bus pods - annotations: {} - # Event Bus port - port: 5557 - # Port where events are published - publishPort: 4442 - # Port where to subscribe for events - subscribePort: 4443 - # Resources for event-bus container - resources: {} - # SecurityContext for event-bus container - securityContext: {} - # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) - serviceType: ClusterIP - # Custom annotations for Event Bus service - serviceAnnotations: {} - # Tolerations for Event Bus pods - tolerations: [] - # Node selector for Event Bus pods - nodeSelector: {} - # Priority class name for Event Bus pods - priorityClassName: "" - - # Configuration for Session Map component - sessionMap: - # Session Map image name - imageName: selenium/sessions - # Session Map image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.10.0-20230607 - - # 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/) - imagePullSecret: "" - - # Custom annotations for Session Map pods - annotations: {} - port: 5556 - # Resources for Session Map container - resources: {} - # SecurityContext for Session Map container - securityContext: {} - # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) - serviceType: ClusterIP - # Custom annotations for Session Map service - serviceAnnotations: {} - # Tolerations for Session Map pods - tolerations: [] - # Node selector for Session Map pods - nodeSelector: {} - # Priority class name for Session Map pods - priorityClassName: "" - - # Configuration for Session Queue component - sessionQueue: - # Session Queue image name - imageName: selenium/session-queue - # Session Queue image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.10.0-20230607 - - # 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/) - imagePullSecret: "" - - # Custom annotations for Session Queue pods - annotations: {} - port: 5559 - # Resources for Session Queue container - resources: {} - # SecurityContext for Session Queue container - securityContext: {} - # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) - serviceType: ClusterIP - # Custom annotations for Session Queue service - serviceAnnotations: {} - # Tolerations for Session Queue pods - tolerations: [] - # Node selector for Session Queue pods - nodeSelector: {} - # Priority class name for Session Queue pods - priorityClassName: "" - - # Custom sub path for all components - subPath: / - - # Custom environment variables for all components - extraEnvironmentVariables: - # - name: SE_JAVA_OPTS - # value: "-Xmx512m" - # - name: - # valueFrom: - # secretKeyRef: - # name: secret-name - # key: secret-key - - # Custom environment variables by sourcing entire configMap, Secret, etc. for all components - extraEnvFrom: - # - configMapRef: - # name: proxy-settings - # - secretRef: - # name: mysecret - -# Configuration for selenium hub deployment (applied only if `isolateComponents: false`) -hub: - # Selenium Hub image name - imageName: selenium/hub - # Selenium Hub image tag (this overwrites global.seleniumGrid.imageTag parameter) - # imageTag: 4.10.0-20230607 - # 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/) - imagePullSecret: "" - - # Custom annotations for Selenium Hub pods - annotations: {} - # Custom labels for Selenium Hub pods - labels: {} - # Port where events are published - publishPort: 4442 - # Port where to subscribe for events - subscribePort: 4443 - # Selenium Hub port - port: 4444 - # Liveness probe settings - livenessProbe: - enabled: true - path: /readyz - initialDelaySeconds: 10 - failureThreshold: 10 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - # Readiness probe settings - readinessProbe: - enabled: true - path: /readyz - initialDelaySeconds: 12 - failureThreshold: 10 - timeoutSeconds: 10 - periodSeconds: 10 - successThreshold: 1 - # Custom sub path for the hub deployment - subPath: / - # Custom environment variables for selenium-hub - extraEnvironmentVariables: - # - name: SE_JAVA_OPTS - # value: "-Xmx512m" - # - name: SECRET_VARIABLE - # valueFrom: - # secretKeyRef: - # name: secret-name - # key: secret-key - # Custom environment variables by sourcing entire configMap, Secret, etc. for selenium-hub - extraEnvFrom: - # - configMapRef: - # name: proxy-settings - # - secretRef: - # name: mysecret - # Resources for selenium-hub container - resources: {} - # SecurityContext for selenium-hub container - securityContext: {} - # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) - serviceType: ClusterIP - # Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) - loadBalancerIP: "" - # Custom annotations for Selenium Hub service - serviceAnnotations: {} - # Tolerations for selenium-hub pods - tolerations: [] - # Node selector for selenium-hub pods - nodeSelector: {} - # Priority class name for selenium-hub pods - priorityClassName: "" - -# Keda scaled object configuration -autoscaling: - # Enable autoscaling. Implies installing KEDA - enabled: false - # Enable autoscaling without automatically installing KEDA - enableWithExistingKEDA: false - # Which typ 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: - pollingInterval: 10 - scalingStrategy: - strategy: accurate - deregisterLifecycle: - preStop: - exec: - command: - - bash - - -c - - | - curl -X POST 127.0.0.1:5555/se/grid/node/drain --header 'X-REGISTRATION-SECRET;' && \ - while curl 127.0.0.1:5555/status; do sleep 1; done; - -# Configuration for chrome nodes -chromeNode: - # Enable chrome nodes - enabled: true - - # NOTE: Only used when autoscaling.enabled is false - # Enable creation of Deployment - # true (default) - if you want long living pods - # false - for provisioning your own custom type such as Jobs - deploymentEnabled: true - - # Number of chrome nodes - replicas: 1 - # Image of chrome nodes - imageName: selenium/node-chrome - # Image of chrome nodes (this overwrites global.seleniumGrid.nodesImageTag) - # imageTag: 4.10.0-20230607 - # 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/) - imagePullSecret: "" - - # Port list to enable on container - ports: - - 5555 - # Selenium port (spec.ports[0].targetPort in kubernetes service) - seleniumPort: 5900 - # Selenium port exposed in service (spec.ports[0].port in kubernetes service) - seleniumServicePort: 6900 - # Annotations for chrome-node pods - annotations: {} - # Labels for chrome-node pods - labels: {} - # Resources for chrome-node container - resources: - requests: - memory: "1Gi" - cpu: "1" - limits: - memory: "1Gi" - cpu: "1" - # SecurityContext for chrome-node container - securityContext: {} - # Tolerations for chrome-node pods - tolerations: [] - # Node selector for chrome-node pods - nodeSelector: {} - # Custom host aliases for chrome nodes - hostAliases: - # - ip: "198.51.100.0" - # hostnames: - # - "example.com" - # - "example.net" - # - ip: "203.0.113.0" - # hostnames: - # - "example.org" - # Custom environment variables for chrome nodes - extraEnvironmentVariables: - # - name: SE_JAVA_OPTS - # value: "-Xmx512m" - # - name: - # valueFrom: - # secretKeyRef: - # name: secret-name - # key: secret-key - # Custom environment variables by sourcing entire configMap, Secret, etc. for chrome nodes - extraEnvFrom: - # - configMapRef: - # name: proxy-settings - # - secretRef: - # name: mysecret - # Service configuration - service: - # Create a service for node - enabled: true - # Service type - type: ClusterIP - # Custom annotations for service - annotations: {} - # Size limit for DSH volume mounted in container (if not set, default is "1Gi") - dshmVolumeSizeLimit: 1Gi - # Priority class name for chrome-node pods - priorityClassName: "" - - # Wait for pod startup - startupProbe: {} - # httpGet: - # path: /status - # port: 5555 - # failureThreshold: 120 - # periodSeconds: 5 - # Time to wait for pod termination - terminationGracePeriodSeconds: 30 - lifecycle: {} - extraVolumeMounts: [] - # - name: my-extra-volume - # mountPath: /home/seluser/Downloads - - extraVolumes: [] - # - name: my-extra-volume - # emptyDir: {} - # - name: my-extra-volume-from-pvc - # persistentVolumeClaim: - # claimName: my-pv-claim - - maxReplicaCount: 8 - 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 - -# Configuration for firefox nodes -firefoxNode: - # Enable firefox nodes - enabled: true - - # NOTE: Only used when autoscaling.enabled is false - # Enable creation of Deployment - # true (default) - if you want long living pods - # false - for provisioning your own custom type such as Jobs - deploymentEnabled: true - - # Number of firefox nodes - replicas: 1 - # Image of firefox nodes - imageName: selenium/node-firefox - # Image of firefox nodes (this overwrites global.seleniumGrid.nodesImageTag) - # imageTag: 4.10.0-20230607 - # 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/) - imagePullSecret: "" - - # Port list to enable on container - ports: - - 5555 - # Selenium port (spec.ports[0].targetPort in kubernetes service) - seleniumPort: 5900 - # Selenium port exposed in service (spec.ports[0].port in kubernetes service) - seleniumServicePort: 6900 - # Annotations for firefox-node pods - annotations: {} - # Labels for firefox-node pods - labels: {} - # Tolerations for firefox-node pods - tolerations: [] - # Node selector for firefox-node pods - nodeSelector: {} - # Resources for firefox-node container - resources: - requests: - memory: "1Gi" - cpu: "1" - limits: - memory: "1Gi" - cpu: "1" - # SecurityContext for firefox-node container - securityContext: {} - # Custom host aliases for firefox nodes - hostAliases: - # - ip: "198.51.100.0" - # hostnames: - # - "example.com" - # - "example.net" - # - ip: "203.0.113.0" - # hostnames: - # - "example.org" - # Custom environment variables for firefox nodes - extraEnvironmentVariables: - # - name: SE_JAVA_OPTS - # value: "-Xmx512m" - # - name: - # valueFrom: - # secretKeyRef: - # name: secret-name - # key: secret-key - # Custom environment variables by sourcing entire configMap, Secret, etc. for firefox nodes - extraEnvFrom: - # - configMapRef: - # name: proxy-settings - # - secretRef: - # name: mysecret - # Service configuration - service: - # Create a service for node - enabled: true - # Service type - type: ClusterIP - # Custom annotations for service - annotations: {} - # Size limit for DSH volume mounted in container (if not set, default is "1Gi") - dshmVolumeSizeLimit: 1Gi - # Priority class name for firefox-node pods - priorityClassName: "" - - # Wait for pod startup - startupProbe: {} - # httpGet: - # path: /status - # port: 5555 - # failureThreshold: 120 - # periodSeconds: 5 - # Time to wait for pod termination - terminationGracePeriodSeconds: 30 - lifecycle: {} - extraVolumeMounts: [] - # - name: my-extra-volume - # mountPath: /home/seluser/Downloads - - extraVolumes: [] - # - name: my-extra-volume - # emptyDir: {} - # - name: my-extra-volume-from-pvc - # persistentVolumeClaim: - # claimName: my-pv-claim - maxReplicaCount: 8 - hpa: - url: '{{ include "seleniumGrid.graphqlURL" . }}' - browserName: firefox - -# Configuration for edge nodes -edgeNode: - # Enable edge nodes - enabled: true - - # NOTE: Only used when autoscaling.enabled is false - # Enable creation of Deployment - # true (default) - if you want long living pods - # false - for provisioning your own custom type such as Jobs - deploymentEnabled: true - - # Number of edge nodes - replicas: 1 - # Image of edge nodes - imageName: selenium/node-edge - # Image of edge nodes (this overwrites global.seleniumGrid.nodesImageTag) - # imageTag: 4.10.0-20230607 - # 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/) - imagePullSecret: "" - - ports: - - 5555 - # Selenium port (spec.ports[0].targetPort in kubernetes service) - seleniumPort: 5900 - # Selenium port exposed in service (spec.ports[0].port in kubernetes service) - seleniumServicePort: 6900 - # Annotations for edge-node pods - annotations: {} - # Labels for edge-node pods - labels: {} - # Tolerations for edge-node pods - tolerations: [] - # Node selector for edge-node pods - nodeSelector: {} - # Resources for edge-node container - resources: - requests: - memory: "1Gi" - cpu: "1" - limits: - memory: "1Gi" - cpu: "1" - # SecurityContext for edge-node container - securityContext: {} - # Custom host aliases for edge nodes - hostAliases: - # - ip: "198.51.100.0" - # hostnames: - # - "example.com" - # - "example.net" - # - ip: "203.0.113.0" - # hostnames: - # - "example.org" - # Custom environment variables for edge nodes - extraEnvironmentVariables: - # - name: SE_JAVA_OPTS - # value: "-Xmx512m" - # - name: - # valueFrom: - # secretKeyRef: - # name: secret-name - # key: secret-key - # Custom environment variables by sourcing entire configMap, Secret, etc. for edge nodes - extraEnvFrom: - # - configMapRef: - # name: proxy-settings - # - secretRef: - # name: mysecret - # Service configuration - service: - # Create a service for node - enabled: true - # Service type - type: ClusterIP - # Custom annotations for service - annotations: - hello: world - # Size limit for DSH volume mounted in container (if not set, default is "1Gi") - dshmVolumeSizeLimit: 1Gi - # Priority class name for edge-node pods - priorityClassName: "" - - # Wait for pod startup - startupProbe: {} - # httpGet: - # path: /status - # port: 5555 - # failureThreshold: 120 - # periodSeconds: 5 - # Time to wait for pod termination - terminationGracePeriodSeconds: 30 - lifecycle: {} - extraVolumeMounts: [] - # - name: my-extra-volume - # mountPath: /home/seluser/Downloads - - extraVolumes: [] - # - name: my-extra-volume - # emptyDir: {} - # - name: my-extra-volume-from-pvc - # persistentVolumeClaim: - # claimName: my-pv-claim - maxReplicaCount: 8 - hpa: - url: '{{ include "seleniumGrid.graphqlURL" . }}' - browserName: MicrosoftEdge - sessionBrowserName: 'msedge' - -# Custom labels for k8s resources -customLabels: {} +global: + seleniumGrid: + # Image tag for all selenium components + imageTag: 4.10.0-20230607 + # Image tag for browser's nodes + nodesImageTag: 4.10.0-20230607 + # Pull secret for all components, can be overridden individually + imagePullSecret: "" + +# Deploy Router, Distributor, EventBus, SessionMap and Nodes separately +isolateComponents: false + +# Configure the ingress resource to access the Grid installation. +ingress: + # Enable or disable ingress resource + enabled: true + # Name of ingress class to select which controller will implement ingress resource + className: "" + # Custom annotations for ingress resource + annotations: {} + # Default host for the ingress resource + hostname: selenium-grid.local + # Default host path for the ingress resource + path: / + # TLS backend configuration for ingress resource + tls: [] + path: / + +# ConfigMap that contains SE_EVENT_BUS_HOST, SE_EVENT_BUS_PUBLISH_PORT and SE_EVENT_BUS_SUBSCRIBE_PORT variables +busConfigMap: + # Name of the configmap + name: selenium-event-bus-config + # Custom annotations for configmap + annotations: {} + +# ConfigMap that contains common environment variables for browser nodes +nodeConfigMap: + name: selenium-node-config + # Custom annotations for configmap + annotations: {} + +# Configuration for isolated components (applied only if `isolateComponents: true`) +components: + + # Configuration for router component + router: + # Router image name + imageName: selenium/router + # Router image tag (this overwrites global.seleniumGrid.imageTag parameter) + # imageTag: 4.10.0-20230607 + + # 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/) + imagePullSecret: "" + + # Custom annotations for router pods + annotations: {} + # Router port + port: 4444 + # Liveness probe settings + livenessProbe: + enabled: true + path: /readyz + initialDelaySeconds: 10 + failureThreshold: 10 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + # Readiness probe settings + readinessProbe: + enabled: true + path: /readyz + initialDelaySeconds: 12 + failureThreshold: 10 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + # Resources for router container + resources: {} + # SecurityContext for router container + securityContext: {} + # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) + serviceType: ClusterIP + # Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) + loadBalancerIP: "" + # Custom annotations for router service + serviceAnnotations: {} + # Tolerations for router pods + tolerations: [] + # Node selector for router pods + nodeSelector: {} + # Priority class name for router pods + priorityClassName: "" + + # Configuration for distributor component + distributor: + # Distributor image name + imageName: selenium/distributor + # Distributor image tag (this overwrites global.seleniumGrid.imageTag parameter) + # imageTag: 4.10.0-20230607 + + # 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/) + imagePullSecret: "" + + # Custom annotations for Distributor pods + annotations: {} + # Distributor port + port: 5553 + # Resources for Distributor container + resources: {} + # SecurityContext for Distributor container + securityContext: {} + # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) + serviceType: ClusterIP + # Custom annotations for Distributor service + serviceAnnotations: {} + # Tolerations for Distributor pods + tolerations: [] + # Node selector for Distributor pods + nodeSelector: {} + # Priority class name for Distributor pods + priorityClassName: "" + + # Configuration for Event Bus component + eventBus: + # Event Bus image name + imageName: selenium/event-bus + # Event Bus image tag (this overwrites global.seleniumGrid.imageTag parameter) + # imageTag: 4.10.0-20230607 + + # 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/) + imagePullSecret: "" + + # Custom annotations for Event Bus pods + annotations: {} + # Event Bus port + port: 5557 + # Port where events are published + publishPort: 4442 + # Port where to subscribe for events + subscribePort: 4443 + # Resources for event-bus container + resources: {} + # SecurityContext for event-bus container + securityContext: {} + # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) + serviceType: ClusterIP + # Custom annotations for Event Bus service + serviceAnnotations: {} + # Tolerations for Event Bus pods + tolerations: [] + # Node selector for Event Bus pods + nodeSelector: {} + # Priority class name for Event Bus pods + priorityClassName: "" + + # Configuration for Session Map component + sessionMap: + # Session Map image name + imageName: selenium/sessions + # Session Map image tag (this overwrites global.seleniumGrid.imageTag parameter) + # imageTag: 4.10.0-20230607 + + # 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/) + imagePullSecret: "" + + # Custom annotations for Session Map pods + annotations: {} + port: 5556 + # Resources for Session Map container + resources: {} + # SecurityContext for Session Map container + securityContext: {} + # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) + serviceType: ClusterIP + # Custom annotations for Session Map service + serviceAnnotations: {} + # Tolerations for Session Map pods + tolerations: [] + # Node selector for Session Map pods + nodeSelector: {} + # Priority class name for Session Map pods + priorityClassName: "" + + # Configuration for Session Queue component + sessionQueue: + # Session Queue image name + imageName: selenium/session-queue + # Session Queue image tag (this overwrites global.seleniumGrid.imageTag parameter) + # imageTag: 4.10.0-20230607 + + # 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/) + imagePullSecret: "" + + # Custom annotations for Session Queue pods + annotations: {} + port: 5559 + # Resources for Session Queue container + resources: {} + # SecurityContext for Session Queue container + securityContext: {} + # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) + serviceType: ClusterIP + # Custom annotations for Session Queue service + serviceAnnotations: {} + # Tolerations for Session Queue pods + tolerations: [] + # Node selector for Session Queue pods + nodeSelector: {} + # Priority class name for Session Queue pods + priorityClassName: "" + + # Custom sub path for all components + subPath: / + + # Custom environment variables for all components + extraEnvironmentVariables: + # - name: SE_JAVA_OPTS + # value: "-Xmx512m" + # - name: + # valueFrom: + # secretKeyRef: + # name: secret-name + # key: secret-key + + # Custom environment variables by sourcing entire configMap, Secret, etc. for all components + extraEnvFrom: + # - configMapRef: + # name: proxy-settings + # - secretRef: + # name: mysecret + +# Configuration for selenium hub deployment (applied only if `isolateComponents: false`) +hub: + # Selenium Hub image name + imageName: selenium/hub + # Selenium Hub image tag (this overwrites global.seleniumGrid.imageTag parameter) + # imageTag: 4.10.0-20230607 + # 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/) + imagePullSecret: "" + + # Custom annotations for Selenium Hub pods + annotations: {} + # Custom labels for Selenium Hub pods + labels: {} + # Port where events are published + publishPort: 4442 + # Port where to subscribe for events + subscribePort: 4443 + # Selenium Hub port + port: 4444 + # Liveness probe settings + livenessProbe: + enabled: true + path: /readyz + initialDelaySeconds: 10 + failureThreshold: 10 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + # Readiness probe settings + readinessProbe: + enabled: true + path: /readyz + initialDelaySeconds: 12 + failureThreshold: 10 + timeoutSeconds: 10 + periodSeconds: 10 + successThreshold: 1 + # Custom sub path for the hub deployment + subPath: / + # Custom environment variables for selenium-hub + extraEnvironmentVariables: + # - name: SE_JAVA_OPTS + # value: "-Xmx512m" + # - name: SECRET_VARIABLE + # valueFrom: + # secretKeyRef: + # name: secret-name + # key: secret-key + # Custom environment variables by sourcing entire configMap, Secret, etc. for selenium-hub + extraEnvFrom: + # - configMapRef: + # name: proxy-settings + # - secretRef: + # name: mysecret + # Resources for selenium-hub container + resources: {} + # SecurityContext for selenium-hub container + securityContext: {} + # Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) + serviceType: ClusterIP + # Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) + loadBalancerIP: "" + # Custom annotations for Selenium Hub service + serviceAnnotations: {} + # Tolerations for selenium-hub pods + tolerations: [] + # Node selector for selenium-hub pods + nodeSelector: {} + # Priority class name for selenium-hub pods + priorityClassName: "" + +# Keda scaled object configuration +autoscaling: + # Enable autoscaling. Implies installing KEDA + enabled: false + # Enable autoscaling without automatically installing KEDA + enableWithExistingKEDA: false + # Which typ 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: + pollingInterval: 10 + scalingStrategy: + strategy: accurate + deregisterLifecycle: + preStop: + exec: + command: + - bash + - -c + - | + curl -X POST 127.0.0.1:5555/se/grid/node/drain --header 'X-REGISTRATION-SECRET;' && \ + while curl 127.0.0.1:5555/status; do sleep 1; done; + +# Configuration for chrome nodes +chromeNode: + # Enable chrome nodes + enabled: true + + # NOTE: Only used when autoscaling.enabled is false + # Enable creation of Deployment + # true (default) - if you want long living pods + # false - for provisioning your own custom type such as Jobs + deploymentEnabled: true + + # Number of chrome nodes + replicas: 1 + # Image of chrome nodes + imageName: selenium/node-chrome + # Image of chrome nodes (this overwrites global.seleniumGrid.nodesImageTag) + # imageTag: 4.10.0-20230607 + # 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/) + imagePullSecret: "" + + # Port list to enable on container + ports: + - 5555 + # Selenium port (spec.ports[0].targetPort in kubernetes service) + seleniumPort: 5900 + # Selenium port exposed in service (spec.ports[0].port in kubernetes service) + seleniumServicePort: 6900 + # Annotations for chrome-node pods + annotations: {} + # Labels for chrome-node pods + labels: {} + # Resources for chrome-node container + resources: + requests: + memory: "1Gi" + cpu: "1" + limits: + memory: "1Gi" + cpu: "1" + # SecurityContext for chrome-node container + securityContext: {} + # Tolerations for chrome-node pods + tolerations: [] + # Node selector for chrome-node pods + nodeSelector: {} + # Custom host aliases for chrome nodes + hostAliases: + # - ip: "198.51.100.0" + # hostnames: + # - "example.com" + # - "example.net" + # - ip: "203.0.113.0" + # hostnames: + # - "example.org" + # Custom environment variables for chrome nodes + extraEnvironmentVariables: + # - name: SE_JAVA_OPTS + # value: "-Xmx512m" + # - name: + # valueFrom: + # secretKeyRef: + # name: secret-name + # key: secret-key + # Custom environment variables by sourcing entire configMap, Secret, etc. for chrome nodes + extraEnvFrom: + # - configMapRef: + # name: proxy-settings + # - secretRef: + # name: mysecret + # Service configuration + service: + # Create a service for node + enabled: true + # Service type + type: ClusterIP + # Custom annotations for service + annotations: {} + # Size limit for DSH volume mounted in container (if not set, default is "1Gi") + dshmVolumeSizeLimit: 1Gi + # Priority class name for chrome-node pods + priorityClassName: "" + + # Wait for pod startup + startupProbe: {} + # httpGet: + # path: /status + # port: 5555 + # failureThreshold: 120 + # periodSeconds: 5 + + # Liveness probe settings + livenessProbe: {} + + # Time to wait for pod termination + terminationGracePeriodSeconds: 30 + lifecycle: {} + extraVolumeMounts: [] + # - name: my-extra-volume + # mountPath: /home/seluser/Downloads + + extraVolumes: [] + # - name: my-extra-volume + # emptyDir: {} + # - name: my-extra-volume-from-pvc + # persistentVolumeClaim: + # claimName: my-pv-claim + + maxReplicaCount: 8 + 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 + +# Configuration for firefox nodes +firefoxNode: + # Enable firefox nodes + enabled: true + + # NOTE: Only used when autoscaling.enabled is false + # Enable creation of Deployment + # true (default) - if you want long living pods + # false - for provisioning your own custom type such as Jobs + deploymentEnabled: true + + # Number of firefox nodes + replicas: 1 + # Image of firefox nodes + imageName: selenium/node-firefox + # Image of firefox nodes (this overwrites global.seleniumGrid.nodesImageTag) + # imageTag: 4.10.0-20230607 + # 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/) + imagePullSecret: "" + + # Port list to enable on container + ports: + - 5555 + # Selenium port (spec.ports[0].targetPort in kubernetes service) + seleniumPort: 5900 + # Selenium port exposed in service (spec.ports[0].port in kubernetes service) + seleniumServicePort: 6900 + # Annotations for firefox-node pods + annotations: {} + # Labels for firefox-node pods + labels: {} + # Tolerations for firefox-node pods + tolerations: [] + # Node selector for firefox-node pods + nodeSelector: {} + # Resources for firefox-node container + resources: + requests: + memory: "1Gi" + cpu: "1" + limits: + memory: "1Gi" + cpu: "1" + # SecurityContext for firefox-node container + securityContext: {} + # Custom host aliases for firefox nodes + hostAliases: + # - ip: "198.51.100.0" + # hostnames: + # - "example.com" + # - "example.net" + # - ip: "203.0.113.0" + # hostnames: + # - "example.org" + # Custom environment variables for firefox nodes + extraEnvironmentVariables: + # - name: SE_JAVA_OPTS + # value: "-Xmx512m" + # - name: + # valueFrom: + # secretKeyRef: + # name: secret-name + # key: secret-key + # Custom environment variables by sourcing entire configMap, Secret, etc. for firefox nodes + extraEnvFrom: + # - configMapRef: + # name: proxy-settings + # - secretRef: + # name: mysecret + # Service configuration + service: + # Create a service for node + enabled: true + # Service type + type: ClusterIP + # Custom annotations for service + annotations: {} + # Size limit for DSH volume mounted in container (if not set, default is "1Gi") + dshmVolumeSizeLimit: 1Gi + # Priority class name for firefox-node pods + priorityClassName: "" + + # Wait for pod startup + startupProbe: {} + # httpGet: + # path: /status + # port: 5555 + # failureThreshold: 120 + # periodSeconds: 5 + + # Liveness probe settings + livenessProbe: {} + + # Time to wait for pod termination + terminationGracePeriodSeconds: 30 + lifecycle: {} + extraVolumeMounts: [] + # - name: my-extra-volume + # mountPath: /home/seluser/Downloads + + extraVolumes: [] + # - name: my-extra-volume + # emptyDir: {} + # - name: my-extra-volume-from-pvc + # persistentVolumeClaim: + # claimName: my-pv-claim + maxReplicaCount: 8 + hpa: + url: '{{ include "seleniumGrid.graphqlURL" . }}' + browserName: firefox + +# Configuration for edge nodes +edgeNode: + # Enable edge nodes + enabled: true + + # NOTE: Only used when autoscaling.enabled is false + # Enable creation of Deployment + # true (default) - if you want long living pods + # false - for provisioning your own custom type such as Jobs + deploymentEnabled: true + + # Number of edge nodes + replicas: 1 + # Image of edge nodes + imageName: selenium/node-edge + # Image of edge nodes (this overwrites global.seleniumGrid.nodesImageTag) + # imageTag: 4.10.0-20230607 + # 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/) + imagePullSecret: "" + + ports: + - 5555 + # Selenium port (spec.ports[0].targetPort in kubernetes service) + seleniumPort: 5900 + # Selenium port exposed in service (spec.ports[0].port in kubernetes service) + seleniumServicePort: 6900 + # Annotations for edge-node pods + annotations: {} + # Labels for edge-node pods + labels: {} + # Tolerations for edge-node pods + tolerations: [] + # Node selector for edge-node pods + nodeSelector: {} + # Resources for edge-node container + resources: + requests: + memory: "1Gi" + cpu: "1" + limits: + memory: "1Gi" + cpu: "1" + # SecurityContext for edge-node container + securityContext: {} + # Custom host aliases for edge nodes + hostAliases: + # - ip: "198.51.100.0" + # hostnames: + # - "example.com" + # - "example.net" + # - ip: "203.0.113.0" + # hostnames: + # - "example.org" + # Custom environment variables for edge nodes + extraEnvironmentVariables: + # - name: SE_JAVA_OPTS + # value: "-Xmx512m" + # - name: + # valueFrom: + # secretKeyRef: + # name: secret-name + # key: secret-key + # Custom environment variables by sourcing entire configMap, Secret, etc. for edge nodes + extraEnvFrom: + # - configMapRef: + # name: proxy-settings + # - secretRef: + # name: mysecret + # Service configuration + service: + # Create a service for node + enabled: true + # Service type + type: ClusterIP + # Custom annotations for service + annotations: + hello: world + # Size limit for DSH volume mounted in container (if not set, default is "1Gi") + dshmVolumeSizeLimit: 1Gi + # Priority class name for edge-node pods + priorityClassName: "" + + # Wait for pod startup + startupProbe: {} + # httpGet: + # path: /status + # port: 5555 + # failureThreshold: 120 + # periodSeconds: 5 + + # Liveness probe settings + livenessProbe: {} + + # Time to wait for pod termination + terminationGracePeriodSeconds: 30 + lifecycle: {} + extraVolumeMounts: [] + # - name: my-extra-volume + # mountPath: /home/seluser/Downloads + + extraVolumes: [] + # - name: my-extra-volume + # emptyDir: {} + # - name: my-extra-volume-from-pvc + # persistentVolumeClaim: + # claimName: my-pv-claim + maxReplicaCount: 8 + hpa: + url: '{{ include "seleniumGrid.graphqlURL" . }}' + browserName: MicrosoftEdge + sessionBrowserName: 'msedge' + +# Custom labels for k8s resources +customLabels: {}