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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion charts/selenium-grid/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| components.router.externalName | string | `""` | Set specific externalName when serviceType is ExternalName (see https://kubernetes.io/docs/concepts/services-networking/service/#type-externalname) |
| components.router.loadBalancerIP | string | `""` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) |
| components.router.serviceAnnotations | object | `{}` | Custom annotations for router service |
| components.router.serviceExternalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| components.router.serviceSessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| components.router.tolerations | list | `[]` | Tolerations for router pods |
| components.router.nodeSelector | object | `{}` | Node selector for router pods |
| components.router.priorityClassName | string | `""` | Priority class name for router pods |
Expand All @@ -217,6 +219,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| components.distributor.securityContext | object | `{}` | SecurityContext for Distributor container |
| components.distributor.serviceType | string | `"ClusterIP"` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) |
| components.distributor.serviceAnnotations | object | `{}` | Custom annotations for Distributor service |
| components.distributor.serviceExternalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| components.distributor.serviceSessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| components.distributor.tolerations | list | `[]` | Tolerations for Distributor pods |
| components.distributor.nodeSelector | object | `{}` | Node selector for Distributor pods |
| components.distributor.priorityClassName | string | `""` | Priority class name for Distributor pods |
Expand All @@ -243,6 +247,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| components.eventBus.externalName | string | `""` | Set specific externalName when serviceType is ExternalName (see https://kubernetes.io/docs/concepts/services-networking/service/#type-externalname) |
| components.eventBus.loadBalancerIP | string | `""` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) |
| components.eventBus.serviceAnnotations | object | `{}` | Custom annotations for Event Bus service |
| components.eventBus.serviceExternalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| components.eventBus.serviceSessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| components.eventBus.tolerations | list | `[]` | Tolerations for Event Bus pods |
| components.eventBus.nodeSelector | object | `{}` | Node selector for Event Bus pods |
| components.eventBus.priorityClassName | string | `""` | Priority class name for Event Bus pods |
Expand All @@ -261,6 +267,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| components.sessionMap.securityContext | object | `{}` | SecurityContext for Session Map container |
| components.sessionMap.serviceType | string | `"ClusterIP"` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) |
| components.sessionMap.serviceAnnotations | object | `{}` | Custom annotations for Session Map service |
| components.sessionMap.serviceExternalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| components.sessionMap.serviceSessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| components.sessionMap.tolerations | list | `[]` | Tolerations for Session Map pods |
| components.sessionMap.nodeSelector | object | `{}` | Node selector for Session Map pods |
| components.sessionMap.priorityClassName | string | `""` | Priority class name for Session Map pods |
Expand All @@ -284,6 +292,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| components.sessionQueue.securityContext | object | `{}` | SecurityContext for Session Queue container |
| components.sessionQueue.serviceType | string | `"ClusterIP"` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) |
| components.sessionQueue.serviceAnnotations | object | `{}` | Custom annotations for Session Queue service |
| components.sessionQueue.serviceExternalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| components.sessionQueue.serviceSessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| components.sessionQueue.tolerations | list | `[]` | Tolerations for Session Queue pods |
| components.sessionQueue.nodeSelector | object | `{}` | Node selector for Session Queue pods |
| components.sessionQueue.priorityClassName | string | `""` | Priority class name for Session Queue pods |
Expand Down Expand Up @@ -323,13 +333,15 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| hub.externalName | string | `""` | Set specific externalName when serviceType is ExternalName (see https://kubernetes.io/docs/concepts/services-networking/service/#type-externalname) |
| hub.loadBalancerIP | string | `""` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) |
| hub.serviceAnnotations | object | `{}` | Custom annotations for Selenium Hub service |
| hub.serviceExternalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| hub.serviceSessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| hub.tolerations | list | `[]` | Tolerations for selenium-hub pods |
| hub.nodeSelector | object | `{}` | Node selector for selenium-hub pods |
| hub.priorityClassName | string | `""` | Priority class name for selenium-hub pods |
| tracing.enabled | bool | `false` | Enable tracing. Implies installing Jaeger |
| tracing.enabledWithExistingEndpoint | bool | `false` | Enable tracing without automatically installing Jaeger |
| tracing.exporter | string | `"otlp"` | Exporter type for tracing. Recommended `otlp` for wide compatibility with observability backends (e.g. Jaeger, Elastic, etc.) |
| tracing.exporterEndpoint | string | `"http://{{ .Release.Name }}-jaeger-collector.{{ .Release.Namespace }}:4317"` | Exporter endpoint for pushing trace data |
| tracing.exporterEndpoint | string | `"http://{{ .Release.Name }}-jaeger-collector:4317"` | Exporter endpoint for pushing trace data |
| tracing.globalAutoConfigure | bool | `true` | Enable global auto-configuration for tracing |
| tracing.ingress.enabled | bool | `true` | Enable ingress resource to access the Jaeger |
| tracing.ingress.annotations | string | `nil` | Annotations for Jaeger ingress resource |
Expand All @@ -350,6 +362,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| monitoring.exporter.service.loadBalancerIP | string | `""` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) |
| monitoring.exporter.service.nodePort | int | `30199` | Node port for service |
| monitoring.exporter.service.annotations | object | `{}` | Annotations for exporter service |
| monitoring.exporter.service.externalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| monitoring.exporter.service.sessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| monitoring.exporter.replicas | int | `1` | |
| monitoring.additionalScrapeConfigs.key | string | `""` | |
| monitoring.additionalScrapeConfigs.value | string | `""` | |
Expand Down Expand Up @@ -413,6 +427,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| chromeNode.service.loadBalancerIP | string | `""` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) |
| chromeNode.service.ports | string | `nil` | Extra ports exposed in node service |
| chromeNode.service.annotations | object | `{}` | Custom annotations for service |
| chromeNode.service.externalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| chromeNode.service.sessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| chromeNode.dshmVolumeSizeLimit | string | `""` | Size limit for DSH volume mounted in container (if not set, default is disabled, e.g "1Gi") |
| chromeNode.priorityClassName | string | `""` | Priority class name for chrome-node pods |
| chromeNode.startupProbe | object | `{"enabled":true,"failureThreshold":12,"initialDelaySeconds":0,"path":"/status","periodSeconds":5,"successThreshold":1,"timeoutSeconds":60}` | Startup probe settings |
Expand Down Expand Up @@ -465,6 +481,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| firefoxNode.service.loadBalancerIP | string | `""` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) |
| firefoxNode.service.ports | string | `nil` | Extra ports exposed in node service |
| firefoxNode.service.annotations | object | `{}` | Custom annotations for service |
| firefoxNode.service.externalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| firefoxNode.service.sessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| firefoxNode.dshmVolumeSizeLimit | string | `"2Gi"` | Size limit for DSH volume mounted in container (if not set, default is disabled, e.g "1Gi") |
| firefoxNode.priorityClassName | string | `""` | Priority class name for firefox-node pods |
| firefoxNode.startupProbe | object | `{"enabled":true,"failureThreshold":12,"initialDelaySeconds":0,"path":"/status","periodSeconds":5,"successThreshold":1,"timeoutSeconds":60}` | Startup probe settings |
Expand Down Expand Up @@ -517,6 +535,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| edgeNode.service.loadBalancerIP | string | `""` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) |
| edgeNode.service.ports | string | `nil` | Extra ports exposed in node service |
| edgeNode.service.annotations | object | `{}` | Custom annotations for service |
| edgeNode.service.externalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| edgeNode.service.sessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| edgeNode.dshmVolumeSizeLimit | string | `""` | Size limit for DSH volume mounted in container (if not set, default is disabled, e.g "1Gi") |
| edgeNode.priorityClassName | string | `""` | Priority class name for edge-node pods |
| edgeNode.startupProbe | object | `{"enabled":true,"failureThreshold":12,"initialDelaySeconds":0,"path":"/status","periodSeconds":5,"successThreshold":1,"timeoutSeconds":60}` | Startup probe settings |
Expand Down Expand Up @@ -569,6 +589,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| relayNode.service.loadBalancerIP | string | `""` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) |
| relayNode.service.ports | string | `nil` | Extra ports exposed in node service |
| relayNode.service.annotations | object | `{}` | Custom annotations for service |
| relayNode.service.externalTrafficPolicy | string | `""` | Set externalTrafficPolicy to Local or Cluster (see https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/) |
| relayNode.service.sessionAffinity | string | `""` | Set session affinity to None, ClientIP or ClientIPString |
| relayNode.dshmVolumeSizeLimit | string | `""` | Size limit for DSH volume mounted in container (if not set, default is disabled, e.g "1Gi") |
| relayNode.priorityClassName | string | `""` | Priority class name for relay-node pods |
| relayNode.startupProbe | object | `{"enabled":true,"failureThreshold":12,"initialDelaySeconds":0,"path":"/status","periodSeconds":5,"successThreshold":1,"timeoutSeconds":60}` | Startup probe settings |
Expand Down
16 changes: 16 additions & 0 deletions charts/selenium-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ This chart enables the creation of a Selenium Grid Server in Kubernetes.
* [Settings when scalingType with `deployment`](#settings-when-scalingtype-with-deployment-)
* [Settings when scalingType with `job`](#settings-when-scalingtype-with-job)
* [Scaler trigger configuration](#scaler-trigger-configuration)
* [Define multiple scalers with different trigger parameters.](#define-multiple-scalers-with-different-trigger-parameters)
* [Settings fixed-sized thread pool for the Distributor to create new sessions](#settings-fixed-sized-thread-pool-for-the-distributor-to-create-new-sessions)
* [Troubleshooting](#troubleshooting)
* [Updating Selenium-Grid release](#updating-selenium-grid-release)
* [Uninstalling Selenium Grid release](#uninstalling-selenium-grid-release)
* [Ingress Configuration](#ingress-configuration)
Expand Down Expand Up @@ -356,6 +358,20 @@ In autoscaling, by default, it will calculate based on `no. of node types * maxR

You can override the default calculation by another value via `components.distributor.newSessionThreadPoolSize` (in full distributed mode) or `hub.newSessionThreadPoolSize` (in basic mode).

### Troubleshooting

This is a list of common issues that you might encounter when enabling autoscaling in Selenium Grid.

- Autoscaling isn't working when deploying KEDA core and Selenium Grid in different namespaces.

For example, you deployed KEDA core in `keda` namespace, and Selenium Grid in `selenium` namespace with config `autoscaling.enableWithExistingKEDA=true`. You observe that the ScaledObject/ScaledJob is created but the scaler isn't triggered.
Use `kubectl logs` to see `keda-operator` pod logs, if you see the error message looks like

> ERROR scale_handler Error getting scaler metrics and activity, but continue {"scaledJob.Name": "selenium-node-firefox-latest", "Scaler": "*scalers.seleniumGridScaler:", "error": "error requesting selenium grid endpoint: Post \"http://selenium-router:4444/graphql\": dial tcp: lookup selenium-router on 10.96.0.10:53: no such host"}

It probably is the DNS issue. You need to check the GraphQL endpoint provided in the trigger metadata is accessible from the KEDA core namespace. In case different namespaces, and using svc name, you might need to use <service-name>.<namespace-name> as the domain name.
At cluster level, you might need to configure network policies to allow traffic between namespaces properly.

## Updating Selenium-Grid release

Once you have a new chart version, you can update your selenium-grid running:
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/configs/scrape/selenium-grid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
insecure_skip_verify: true
static_configs:
- targets:
- '{{ template "seleniumGrid.monitoring.exporter.fullname" $ }}.{{ .Release.Namespace }}:{{ $.Values.monitoring.exporter.port }}'
- '{{ template "seleniumGrid.monitoring.exporter.fullname" $ }}:{{ $.Values.monitoring.exporter.port }}'
6 changes: 6 additions & 0 deletions charts/selenium-grid/templates/chrome-node-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- with $nodeConfig.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- with $nodeConfig.service.sessionAffinity }}
sessionAffinity: {{ . }}
{{- end }}
---
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/selenium-grid/templates/distributor-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ spec:
- name: SE_DISTRIBUTOR_PORT
value: {{ .Values.components.distributor.port | quote }}
- name: SE_ROUTER_HOST
value: '{{ template "seleniumGrid.router.fullname" . }}.{{ .Release.Namespace }}'
value: '{{ template "seleniumGrid.router.fullname" . }}'
- name: SE_ROUTER_PORT
value: {{ .Values.components.router.port | quote }}
- name: SE_SESSIONS_MAP_HOST
value: '{{ template "seleniumGrid.sessionMap.fullname" . }}.{{ .Release.Namespace }}'
value: '{{ template "seleniumGrid.sessionMap.fullname" . }}'
- name: SE_SESSIONS_MAP_PORT
value: {{ .Values.components.sessionMap.port | quote }}
- name: SE_SESSION_QUEUE_HOST
value: '{{ template "seleniumGrid.sessionQueue.fullname" . }}.{{ .Release.Namespace }}'
value: '{{ template "seleniumGrid.sessionQueue.fullname" . }}'
- name: SE_SESSION_QUEUE_PORT
value: {{ .Values.components.sessionQueue.port | quote }}
{{- if .Values.components.distributor.newSessionThreadPoolSize }}
Expand Down
6 changes: 6 additions & 0 deletions charts/selenium-grid/templates/distributor-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ spec:
{{- if and (eq .Values.components.distributor.serviceType "NodePort") .Values.components.distributor.nodePort }}
nodePort: {{ .Values.components.distributor.nodePort }}
{{- end }}
{{- with .Values.components.distributor.serviceExternalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- with .Values.components.distributor.serviceSessionAffinity }}
sessionAffinity: {{ . }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/selenium-grid/templates/edge-node-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- with $nodeConfig.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- with $nodeConfig.service.sessionAffinity }}
sessionAffinity: {{ . }}
{{- end }}
---
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/event-bus-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- $eventBusHost := printf "%s.%s" (ternary (include "seleniumGrid.eventBus.fullname" .) (include "seleniumGrid.hub.fullname" .) .Values.isolateComponents) (.Release.Namespace) -}}
{{- $eventBusHost := printf "%s" (ternary (include "seleniumGrid.eventBus.fullname" .) (include "seleniumGrid.hub.fullname" .) .Values.isolateComponents) -}}
{{- $eventBusPublishPort := ternary .Values.components.eventBus.publishPort .Values.hub.publishPort .Values.isolateComponents -}}
{{- $eventBusSubscribePort := ternary .Values.components.eventBus.subscribePort .Values.hub.subscribePort .Values.isolateComponents -}}
apiVersion: v1
Expand Down
6 changes: 6 additions & 0 deletions charts/selenium-grid/templates/event-bus-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,10 @@ spec:
{{- if and (eq .Values.components.eventBus.serviceType "NodePort") .Values.components.eventBus.subscribeNodePort }}
nodePort: {{ .Values.components.eventBus.subscribeNodePort }}
{{- end }}
{{- with .Values.components.eventBus.serviceExternalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- with .Values.components.eventBus.serviceSessionAffinity }}
sessionAffinity: {{ . }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/selenium-grid/templates/firefox-node-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- with $nodeConfig.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- with $nodeConfig.service.sessionAffinity }}
sessionAffinity: {{ . }}
{{- end }}
---
{{- end }}
{{- end }}
Loading
Loading