Skip to content

Commit

Permalink
helm chart VolumeMounts & Volumes for Selenium hub (#1893)
Browse files Browse the repository at this point in the history
* helm chart VolumeMounts & Volumes for hub

Add the extraVolumes & extraVolumeMounts in values. Also add the
block of volumes & volumeMounts in hub deployment yaml.

Fixes #1801

* Update Readme

---------

Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
  • Loading branch information
yo-ga and diemol committed Aug 1, 2023
1 parent fb28eea commit ef332bb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/selenium-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ You can configure the Selenium Hub with this values:
| `hub.subPath` | `/` | Custom sub path for the hub deployment |
| `hub.extraEnvironmentVariables` | `nil` | Custom environment variables for selenium-hub |
| `hub.extraEnvFrom` | `nil` | Custom environment variables for selenium taken from `configMap` or `secret`-hub |
| `hub.extraVolumeMounts` | `[]` | Extra mounts of declared ExtraVolumes into pod |
| `hub.extraVolumes` | `[]` | Extra Volumes declarations to be used in the pod (can be any supported volume type: ConfigMap, Secret, PVC, NFS, etc.) |
| `hub.resources` | `{}` | Resources for selenium-hub container |
| `hub.securityContext` | `See values.yaml` | Security context for selenium-hub container |
| `hub.serviceType` | `ClusterIP` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) |
Expand Down
8 changes: 8 additions & 0 deletions charts/selenium-grid/templates/hub-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ spec:
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.hub.extraVolumeMounts }}
volumeMounts:
{{- tpl (toYaml .) $ | nindent 12 }}
{{- end }}
{{- with .Values.hub.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
Expand All @@ -94,4 +98,8 @@ spec:
{{- with .Values.hub.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.hub.extraVolumes }}
volumes:
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,16 @@ hub:
# name: proxy-settings
# - secretRef:
# name: mysecret
extraVolumeMounts: []
# - name: my-extra-volume
# mountPath: /home/seluser/Downloads

extraVolumes: []
# - name: my-extra-volume
# emptyDir: {}
# - name: my-extra-volume-from-pvc
# persistentVolumeClaim:
# claimName: my-pv-claim
# Resources for selenium-hub container
resources: {}
# SecurityContext for selenium-hub container
Expand Down

0 comments on commit ef332bb

Please sign in to comment.