diff --git a/charts/selenium-grid/README.md b/charts/selenium-grid/README.md index 29b4239d9..20488b1d4 100644 --- a/charts/selenium-grid/README.md +++ b/charts/selenium-grid/README.md @@ -27,6 +27,8 @@ 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/. +# Verify ingress configuration via kubectl get ingress +# Notes: In case you want to set hostname is selenium-grid.local. You need to add the IP and hostname to the local host file in `/etc/hosts` ``` ## Enable Selenium Grid Autoscaling @@ -93,6 +95,9 @@ This table contains the configuration parameters of the chart and their default | Parameter | Default | Description | |-----------------------------------------------|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------| +| `basicAuth.enabled` | `true` | Enable or disable basic auth for Selenium Grid | +| `basicAuth.username` | `admin` | Username of basic auth for Selenium Grid | +| `basicAuth.password` | `admin` | Password of basic auth for Selenium Grid | | `isolateComponents` | `false` | Deploy Router, Distributor, EventBus, SessionMap and Nodes separately | | `serviceAccount.create` | `true` | Enable or disable creation of service account (if `false`, `serviceAccount.name` MUST be specified | | `serviceAccount.name` | `""` | Name of the service account to be made or existing service account to use for all deployments and jobs | @@ -104,8 +109,10 @@ This table contains the configuration parameters of the chart and their default | `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.hostname` | `` | Default host for the ingress resource | | `ingress.path` | `/` | Default host path for the ingress resource | +| `ingress.pathType` | `Prefix` | Default path type for the ingress resource | +| `ingress.paths` | `[]` | List of paths config for the ingress resource. This will override the default path | | `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 | diff --git a/charts/selenium-grid/templates/ingress.yaml b/charts/selenium-grid/templates/ingress.yaml index 77aa8604c..f574c6c2f 100644 --- a/charts/selenium-grid/templates/ingress.yaml +++ b/charts/selenium-grid/templates/ingress.yaml @@ -47,8 +47,9 @@ spec: {{- end }} {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.Version }} paths: + {{- if empty (.Values.ingress.paths) }} - path: {{ $.Values.ingress.path | default "/" }} - pathType: Prefix + pathType: {{ $.Values.ingress.pathType | default "Prefix" }} backend: service: {{- if $.Values.isolateComponents }} @@ -60,6 +61,9 @@ spec: port: number: {{ $.Values.hub.port }} {{- end }} + {{- else }} + {{- tpl (toYaml .Values.ingress.paths | nindent 10) . }} + {{- end }} {{- else }} paths: - path: / diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 2d4625b6f..e464e508b 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -35,9 +35,13 @@ ingress: # Custom annotations for ingress resource annotations: {} # Default host for the ingress resource - hostname: selenium-grid.local + hostname: "" # Default host path for the ingress resource path: / + # Default path type for the ingress resource + pathType: Prefix + # List of paths for the ingress resource. This will override the default path + paths: [] # TLS backend configuration for ingress resource tls: []