Skip to content

Commit 009d47c

Browse files
authored
Add chart parameter ingress.paths to configure custom paths (#1994)
* Add chart parameter ingress.paths to configure custom paths Signed-off-by: Viet Nguyen Duc <[email protected]> * #1810 Update dafault value for ingress.hostname Signed-off-by: Viet Nguyen Duc <[email protected]> * Update chart README for config parameters basicAuth. Signed-off-by: Viet Nguyen Duc <[email protected]> --------- Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 599c704 commit 009d47c

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

charts/selenium-grid/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ helm install selenium-grid docker-selenium/selenium-grid --version <version>
2727

2828
# In both cases grid exposed by default using ingress. You may want to set hostname for the grid. Default hostname is selenium-grid.local.
2929
helm install selenium-grid --set ingress.hostname=selenium-grid.k8s.local docker-selenium/chart/selenium-grid/.
30+
# Verify ingress configuration via kubectl get ingress
31+
# 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`
3032
```
3133

3234
## Enable Selenium Grid Autoscaling
@@ -93,6 +95,9 @@ This table contains the configuration parameters of the chart and their default
9395

9496
| Parameter | Default | Description |
9597
|-----------------------------------------------|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|
98+
| `basicAuth.enabled` | `true` | Enable or disable basic auth for Selenium Grid |
99+
| `basicAuth.username` | `admin` | Username of basic auth for Selenium Grid |
100+
| `basicAuth.password` | `admin` | Password of basic auth for Selenium Grid |
96101
| `isolateComponents` | `false` | Deploy Router, Distributor, EventBus, SessionMap and Nodes separately |
97102
| `serviceAccount.create` | `true` | Enable or disable creation of service account (if `false`, `serviceAccount.name` MUST be specified |
98103
| `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
104109
| `ingress.enabled` | `true` | Enable or disable ingress resource |
105110
| `ingress.className` | `""` | Name of ingress class to select which controller will implement ingress resource |
106111
| `ingress.annotations` | `{}` | Custom annotations for ingress resource |
107-
| `ingress.hostname` | `selenium-grid.local` | Default host for the ingress resource |
112+
| `ingress.hostname` | `` | Default host for the ingress resource |
108113
| `ingress.path` | `/` | Default host path for the ingress resource |
114+
| `ingress.pathType` | `Prefix` | Default path type for the ingress resource |
115+
| `ingress.paths` | `[]` | List of paths config for the ingress resource. This will override the default path |
109116
| `ingress.tls` | `[]` | TLS backend configuration for ingress resource |
110117
| `autoscaling.enableWithExistingKEDA` | `false` | Enable autoscaling of browser nodes. |
111118
| `autoscaling.enabled` | `false` | Same as above plus installation of KEDA |

charts/selenium-grid/templates/ingress.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ spec:
4747
{{- end }}
4848
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.Version }}
4949
paths:
50+
{{- if empty (.Values.ingress.paths) }}
5051
- path: {{ $.Values.ingress.path | default "/" }}
51-
pathType: Prefix
52+
pathType: {{ $.Values.ingress.pathType | default "Prefix" }}
5253
backend:
5354
service:
5455
{{- if $.Values.isolateComponents }}
@@ -60,6 +61,9 @@ spec:
6061
port:
6162
number: {{ $.Values.hub.port }}
6263
{{- end }}
64+
{{- else }}
65+
{{- tpl (toYaml .Values.ingress.paths | nindent 10) . }}
66+
{{- end }}
6367
{{- else }}
6468
paths:
6569
- path: /

charts/selenium-grid/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ ingress:
3535
# Custom annotations for ingress resource
3636
annotations: {}
3737
# Default host for the ingress resource
38-
hostname: selenium-grid.local
38+
hostname: ""
3939
# Default host path for the ingress resource
4040
path: /
41+
# Default path type for the ingress resource
42+
pathType: Prefix
43+
# List of paths for the ingress resource. This will override the default path
44+
paths: []
4145
# TLS backend configuration for ingress resource
4246
tls: []
4347

0 commit comments

Comments
 (0)