Skip to content

Commit

Permalink
Add chart parameter ingress.paths to configure custom paths (#1994)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
VietND96 authored Nov 6, 2023
1 parent 599c704 commit 009d47c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
9 changes: 8 additions & 1 deletion charts/selenium-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ helm install selenium-grid docker-selenium/selenium-grid --version <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
Expand Down Expand Up @@ -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 |
Expand All @@ -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 |
Expand Down
6 changes: 5 additions & 1 deletion charts/selenium-grid/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -60,6 +61,9 @@ spec:
port:
number: {{ $.Values.hub.port }}
{{- end }}
{{- else }}
{{- tpl (toYaml .Values.ingress.paths | nindent 10) . }}
{{- end }}
{{- else }}
paths:
- path: /
Expand Down
6 changes: 5 additions & 1 deletion charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []

Expand Down

0 comments on commit 009d47c

Please sign in to comment.