Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(chart): Add chart parameter ingress.paths to configure custom paths #1994

Merged
merged 3 commits into from
Nov 6, 2023
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
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