From 97941f86643a0f3238f8fdb0c72b83d01fe430f0 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Tue, 26 Mar 2024 21:40:42 +0000 Subject: [PATCH] feat(chart): Configure fixed-sized thread pool for the Distributor to create new sessions Signed-off-by: Viet Nguyen Duc --- .github/workflows/helm-chart-test.yml | 4 +- .../start-selenium-grid-distributor.sh | 5 + Hub/start-selenium-grid-hub.sh | 5 + Standalone/start-selenium-standalone.sh | 5 + charts/selenium-grid/README.md | 184 +++++++++--------- .../templates/distributor-deployment.yaml | 4 + .../templates/hub-deployment.yaml | 4 + .../templates/router-deployment.yaml | 4 +- charts/selenium-grid/values.yaml | 8 +- tests/charts/templates/render/dummy.yaml | 2 +- .../templates/render/dummy_solution.yaml | 2 +- 11 files changed, 128 insertions(+), 99 deletions(-) diff --git a/.github/workflows/helm-chart-test.yml b/.github/workflows/helm-chart-test.yml index cadc9ca01..8679ad07e 100644 --- a/.github/workflows/helm-chart-test.yml +++ b/.github/workflows/helm-chart-test.yml @@ -40,12 +40,12 @@ jobs: test-existing-keda: true - k8s-version: 'v1.26.15' test-strategy: deployment - cluster: 'kind' + cluster: 'minikube' helm-version: 'v3.11.3' test-existing-keda: true - k8s-version: 'v1.27.12' test-strategy: job_https - cluster: 'kind' + cluster: 'minikube' helm-version: 'v3.12.3' test-existing-keda: true - k8s-version: 'v1.28.8' diff --git a/Distributor/start-selenium-grid-distributor.sh b/Distributor/start-selenium-grid-distributor.sh index 75c4b0cac..f81049e04 100755 --- a/Distributor/start-selenium-grid-distributor.sh +++ b/Distributor/start-selenium-grid-distributor.sh @@ -93,6 +93,11 @@ if [ ! -z "$SE_REJECT_UNSUPPORTED_CAPS" ]; then SE_OPTS="$SE_OPTS --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}" fi +if [ ! -z "$SE_NEW_SESSION_THREAD_POOL_SIZE" ]; then + echo "Appending Selenium options: --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}" + SE_OPTS="$SE_OPTS --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}" +fi + EXTRA_LIBS="" if [ "$SE_ENABLE_TRACING" = "true" ]; then diff --git a/Hub/start-selenium-grid-hub.sh b/Hub/start-selenium-grid-hub.sh index 7397db0d0..402f66c44 100755 --- a/Hub/start-selenium-grid-hub.sh +++ b/Hub/start-selenium-grid-hub.sh @@ -66,6 +66,11 @@ if [ ! -z "$SE_REJECT_UNSUPPORTED_CAPS" ]; then SE_OPTS="$SE_OPTS --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}" fi +if [ ! -z "$SE_NEW_SESSION_THREAD_POOL_SIZE" ]; then + echo "Appending Selenium options: --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}" + SE_OPTS="$SE_OPTS --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}" +fi + EXTRA_LIBS="" if [ "$SE_ENABLE_TRACING" = "true" ]; then diff --git a/Standalone/start-selenium-standalone.sh b/Standalone/start-selenium-standalone.sh index 79f81f3ca..bc7b4f859 100755 --- a/Standalone/start-selenium-standalone.sh +++ b/Standalone/start-selenium-standalone.sh @@ -70,6 +70,11 @@ if [ ! -z "$SE_REJECT_UNSUPPORTED_CAPS" ]; then SE_OPTS="$SE_OPTS --reject-unsupported-caps ${SE_REJECT_UNSUPPORTED_CAPS}" fi +if [ ! -z "$SE_NEW_SESSION_THREAD_POOL_SIZE" ]; then + echo "Appending Selenium options: --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}" + SE_OPTS="$SE_OPTS --newsession-threadpool-size ${SE_NEW_SESSION_THREAD_POOL_SIZE}" +fi + /opt/bin/generate_config echo "Selenium Grid Standalone configuration: " diff --git a/charts/selenium-grid/README.md b/charts/selenium-grid/README.md index d03d020a5..68f18a2c1 100644 --- a/charts/selenium-grid/README.md +++ b/charts/selenium-grid/README.md @@ -888,6 +888,7 @@ You can configure the Selenium Hub with these values: | `hub.annotations` | `{}` | Custom annotations for Selenium Hub pod | | `hub.labels` | `{}` | Custom labels for Selenium Hub pod | | `hub.disableUI` | `false` | Disable the Grid UI | +| `hub.newSessionThreadPoolSize` | `nil` | Configure fixed-sized thread pool for the Distributor to create new sessions as it consumes new session requests from the queue | | `hub.publishPort` | `4442` | Port where events are published | | `hub.publishNodePort` | `31442` | NodePort where events are published | | `hub.subscribePort` | `4443` | Port where to subscribe for events | @@ -916,96 +917,97 @@ You can configure the Selenium Hub with these values: If you implement selenium-grid with separate components (`isolateComponents: true`), you can configure all components via the following values: -| Parameter | Default | Description | -|----------------------------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| -| `components.router.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | -| `components.router.imageName` | `router` | Router image name | -| `components.router.imageTag` | `nil` | Router image tag (this overwrites `.global.seleniumGrid.imageTag` value) | -| `components.router.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `components.router.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `components.router.annotations` | `{}` | Custom annotations for router pod | -| `components.router.port` | `4444` | Router port | -| `components.router.nodePort` | `30444` | Router NodePort | -| `components.router.livenessProbe` | `See values.yaml` | Liveness probe settings | -| `components.router.readinessProbe` | `See values.yaml` | Readiness probe settings | -| `components.router.resources` | `{}` | Resources for router pod | -| `components.router.securityContext` | `See values.yaml` | Security context for router pod | -| `components.router.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| `components.router.loadBalancerIP` | `nil` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) | -| `components.router.serviceAnnotations` | `{}` | Custom annotations for router service | -| `components.router.tolerations` | `[]` | Tolerations for router pods | -| `components.router.nodeSelector` | `{}` | Node Selector for router pods | -| `components.router.affinity` | `{}` | Affinity for router pods | -| `components.router.priorityClassName` | `""` | Priority class name for router pods | -| `components.distributor.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | -| `components.distributor.imageName` | `distributor` | Distributor image name | -| `components.distributor.imageTag` | `nil` | Distributor image tag (this overwrites `.global.seleniumGrid.imageTag` value) | -| `components.distributor.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `components.distributor.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `components.distributor.annotations` | `{}` | Custom annotations for Distributor pod | -| `components.distributor.port` | `5553` | Distributor port | -| `components.distributor.nodePort` | `30553` | Distributor NodePort | -| `components.distributor.resources` | `{}` | Resources for Distributor pod | -| `components.distributor.securityContext` | `See values.yaml` | Security context for Distributor pod | -| `components.distributor.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| `components.distributor.serviceAnnotations` | `{}` | Custom annotations for Distributor service | -| `components.distributor.tolerations` | `[]` | Tolerations for Distributor pods | -| `components.distributor.nodeSelector` | `{}` | Node Selector for Distributor pods | -| `components.distributor.affinity` | `{}` | Affinity for Distributor pods | -| `components.distributor.priorityClassName` | `""` | Priority class name for Distributor pods | -| `components.eventBus.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | -| `components.eventBus.imageName` | `event-bus` | Event Bus image name | -| `components.eventBus.imageTag` | `nil` | Event Bus image tag (this overwrites `.global.seleniumGrid.imageTag` value) | -| `components.eventBus.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `components.eventBus.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `components.eventBus.annotations` | `{}` | Custom annotations for Event Bus pod | -| `components.eventBus.port` | `5557` | Event Bus port | -| `components.eventBus.nodePort` | `30557` | Event Bus NodePort | -| `components.eventBus.publishPort` | `4442` | Port where events are published | -| `components.eventBus.publishNodePort` | `30442` | NodePort where events are published | -| `components.eventBus.subscribePort` | `4443` | Port where to subscribe for events | -| `components.eventBus.subscribeNodePort` | `30443` | NodePort where to subscribe for events | -| `components.eventBus.resources` | `{}` | Resources for event-bus pod | -| `components.eventBus.securityContext` | `See values.yaml` | Security context for event-bus pod | -| `components.eventBus.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| `components.eventBus.serviceAnnotations` | `{}` | Custom annotations for Event Bus service | -| `components.eventBus.tolerations` | `[]` | Tolerations for Event Bus pods | -| `components.eventBus.nodeSelector` | `{}` | Node Selector for Event Bus pods | -| `components.eventBus.affinity` | `{}` | Affinity for Event Bus pods | -| `components.eventBus.priorityClassName` | `""` | Priority class name for Event Bus pods | -| `components.sessionMap.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | -| `components.sessionMap.imageName` | `sessions` | Session Map image name | -| `components.sessionMap.imageTag` | `nil` | Session Map image tag (this overwrites `.global.seleniumGrid.imageTag` value) | -| `components.sessionMap.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `components.sessionMap.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `components.sessionMap.annotations` | `{}` | Custom annotations for Session Map pod | -| `components.sessionMap.resources` | `{}` | Resources for Session Map pod | -| `components.sessionMap.securityContext` | `See values.yaml` | Security context for Session Map pod | -| `components.sessionMap.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | -| `components.sessionMap.serviceAnnotations` | `{}` | Custom annotations for Session Map service | -| `components.sessionMap.tolerations` | `[]` | Tolerations for Session Map pods | -| `components.sessionMap.nodeSelector` | `{}` | Node Selector for Session Map pods | -| `components.sessionMap.affinity` | `{}` | Affinity for Session Map pods | -| `components.sessionMap.priorityClassName` | `""` | Priority class name for Session Map pods | -| `components.sessionQueue.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | -| `components.sessionQueue.imageName` | `session-queue` | Session Queue image name | -| `components.sessionQueue.imageTag` | `nil` | Session Queue image tag (this overwrites `.global.seleniumGrid.imageTag` value) | -| `components.sessionQueue.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | -| `components.sessionQueue.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | -| `components.sessionQueue.annotations` | `{}` | Custom annotations for Session Queue pod | -| `components.sessionQueue.port` | `5559` | Session Queue Port | -| `components.sessionQueue.nodePort` | `30559` | Session Queue NodePort | -| `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.disableUI` | `false` | Disable the Grid UI | -| `components.extraEnvironmentVariables` | `nil` | Custom environment variables for all components | -| `components.extraEnvFrom` | `nil` | Custom environment variables taken from `configMap` or `secret` for all components | +| Parameter | Default | Description | +|---------------------------------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| +| `components.router.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | +| `components.router.imageName` | `router` | Router image name | +| `components.router.imageTag` | `nil` | Router image tag (this overwrites `.global.seleniumGrid.imageTag` value) | +| `components.router.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `components.router.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `components.router.annotations` | `{}` | Custom annotations for router pod | +| `components.router.port` | `4444` | Router port | +| `components.router.nodePort` | `30444` | Router NodePort | +| `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.router.disableUI` | `false` | Disable the Grid UI | +| `components.distributor.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | +| `components.distributor.imageName` | `distributor` | Distributor image name | +| `components.distributor.imageTag` | `nil` | Distributor image tag (this overwrites `.global.seleniumGrid.imageTag` value) | +| `components.distributor.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `components.distributor.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `components.distributor.annotations` | `{}` | Custom annotations for Distributor pod | +| `components.distributor.port` | `5553` | Distributor port | +| `components.distributor.nodePort` | `30553` | Distributor NodePort | +| `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.distributor.newSessionThreadPoolSize` | `nil` | Configure fixed-sized thread pool for the Distributor to create new sessions as it consumes new session requests from the queue | +| `components.eventBus.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | +| `components.eventBus.imageName` | `event-bus` | Event Bus image name | +| `components.eventBus.imageTag` | `nil` | Event Bus image tag (this overwrites `.global.seleniumGrid.imageTag` value) | +| `components.eventBus.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `components.eventBus.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `components.eventBus.annotations` | `{}` | Custom annotations for Event Bus pod | +| `components.eventBus.port` | `5557` | Event Bus port | +| `components.eventBus.nodePort` | `30557` | Event Bus NodePort | +| `components.eventBus.publishPort` | `4442` | Port where events are published | +| `components.eventBus.publishNodePort` | `30442` | NodePort where events are published | +| `components.eventBus.subscribePort` | `4443` | Port where to subscribe for events | +| `components.eventBus.subscribeNodePort` | `30443` | NodePort where to subscribe for events | +| `components.eventBus.resources` | `{}` | Resources for event-bus pod | +| `components.eventBus.securityContext` | `See values.yaml` | Security context for event-bus pod | +| `components.eventBus.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | +| `components.eventBus.serviceAnnotations` | `{}` | Custom annotations for Event Bus service | +| `components.eventBus.tolerations` | `[]` | Tolerations for Event Bus pods | +| `components.eventBus.nodeSelector` | `{}` | Node Selector for Event Bus pods | +| `components.eventBus.affinity` | `{}` | Affinity for Event Bus pods | +| `components.eventBus.priorityClassName` | `""` | Priority class name for Event Bus pods | +| `components.sessionMap.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | +| `components.sessionMap.imageName` | `sessions` | Session Map image name | +| `components.sessionMap.imageTag` | `nil` | Session Map image tag (this overwrites `.global.seleniumGrid.imageTag` value) | +| `components.sessionMap.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `components.sessionMap.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `components.sessionMap.annotations` | `{}` | Custom annotations for Session Map pod | +| `components.sessionMap.resources` | `{}` | Resources for Session Map pod | +| `components.sessionMap.securityContext` | `See values.yaml` | Security context for Session Map pod | +| `components.sessionMap.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) | +| `components.sessionMap.serviceAnnotations` | `{}` | Custom annotations for Session Map service | +| `components.sessionMap.tolerations` | `[]` | Tolerations for Session Map pods | +| `components.sessionMap.nodeSelector` | `{}` | Node Selector for Session Map pods | +| `components.sessionMap.affinity` | `{}` | Affinity for Session Map pods | +| `components.sessionMap.priorityClassName` | `""` | Priority class name for Session Map pods | +| `components.sessionQueue.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | +| `components.sessionQueue.imageName` | `session-queue` | Session Queue image name | +| `components.sessionQueue.imageTag` | `nil` | Session Queue image tag (this overwrites `.global.seleniumGrid.imageTag` value) | +| `components.sessionQueue.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | +| `components.sessionQueue.imagePullSecret` | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry) | +| `components.sessionQueue.annotations` | `{}` | Custom annotations for Session Queue pod | +| `components.sessionQueue.port` | `5559` | Session Queue Port | +| `components.sessionQueue.nodePort` | `30559` | Session Queue NodePort | +| `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/distributor-deployment.yaml b/charts/selenium-grid/templates/distributor-deployment.yaml index 18334cc20..c1816626f 100644 --- a/charts/selenium-grid/templates/distributor-deployment.yaml +++ b/charts/selenium-grid/templates/distributor-deployment.yaml @@ -52,6 +52,10 @@ spec: value: '{{ template "seleniumGrid.sessionQueue.fullname" . }}.{{ .Release.Namespace }}' - name: SE_SESSION_QUEUE_PORT value: {{ .Values.components.sessionQueue.port | quote }} + {{- with .Values.components.distributor.newSessionThreadPoolSize }} + - name: SE_NEW_SESSION_THREAD_POOL_SIZE + value: {{ . | quote }} + {{- end }} {{- with .Values.components.extraEnvironmentVariables }} {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} diff --git a/charts/selenium-grid/templates/hub-deployment.yaml b/charts/selenium-grid/templates/hub-deployment.yaml index 324a95407..d746e7b3c 100644 --- a/charts/selenium-grid/templates/hub-deployment.yaml +++ b/charts/selenium-grid/templates/hub-deployment.yaml @@ -109,6 +109,10 @@ spec: - name: SE_DISABLE_UI value: {{ .Values.hub.disableUI | quote }} {{- end }} + {{- with .Values.hub.newSessionThreadPoolSize }} + - name: SE_NEW_SESSION_THREAD_POOL_SIZE + value: {{ . | quote }} + {{- end }} {{- with .Values.hub.extraEnvironmentVariables }} {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} diff --git a/charts/selenium-grid/templates/router-deployment.yaml b/charts/selenium-grid/templates/router-deployment.yaml index 633760982..8b57395ae 100644 --- a/charts/selenium-grid/templates/router-deployment.yaml +++ b/charts/selenium-grid/templates/router-deployment.yaml @@ -59,9 +59,9 @@ spec: - name: SE_SUB_PATH value: {{ . | quote }} {{- end }} - {{- if .Values.components.disableUI }} + {{- if .Values.components.router.disableUI }} - name: SE_DISABLE_UI - value: {{ .Values.components.disableUI | quote }} + value: {{ .Values.components.router.disableUI | quote }} {{- end }} {{- with .Values.components.extraEnvironmentVariables }} {{- tpl (toYaml .) $ | nindent 12 }} diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index e6a68c47c..6a4bc31f5 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -201,6 +201,8 @@ components: # Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) imagePullSecret: "" + # Disable the Grid UI + disableUI: false # Custom annotations for router pods annotations: {} # Router port @@ -263,6 +265,8 @@ components: # Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) imagePullSecret: "" + # Configure fixed-sized thread pool for the Distributor to create new sessions as it consumes new session requests from the queue + newSessionThreadPoolSize: # Custom annotations for Distributor pods annotations: {} # Distributor port @@ -387,8 +391,6 @@ components: # Custom sub path for all components subPath: "" - # Disable the Grid UI - disableUI: false # Custom environment variables for all components extraEnvironmentVariables: @@ -425,6 +427,8 @@ hub: labels: {} # Disable the Grid UI disableUI: false + # Configure fixed-sized thread pool for the Distributor to create new sessions as it consumes new session requests from the queue + newSessionThreadPoolSize: # Port where events are published publishPort: 4442 publishNodePort: 31442 diff --git a/tests/charts/templates/render/dummy.yaml b/tests/charts/templates/render/dummy.yaml index 4df66ad5c..b4a33567d 100644 --- a/tests/charts/templates/render/dummy.yaml +++ b/tests/charts/templates/render/dummy.yaml @@ -62,8 +62,8 @@ isolateComponents: true components: subPath: *gridAppRoot - disableUI: true router: + disableUI: true annotations: "restartOnUpdate": "true" serviceType: NodePort diff --git a/tests/charts/templates/render/dummy_solution.yaml b/tests/charts/templates/render/dummy_solution.yaml index 00bb128b4..28e7d7b6d 100644 --- a/tests/charts/templates/render/dummy_solution.yaml +++ b/tests/charts/templates/render/dummy_solution.yaml @@ -63,8 +63,8 @@ selenium-grid: components: subPath: *gridAppRoot - disableUI: true router: + disableUI: true serviceType: NodePort distributor: serviceType: NodePort