Skip to content

Commit

Permalink
K8s: Update config components.subPath to components.router.subPath
Browse files Browse the repository at this point in the history
Since `subPath` is a config belongs to Router, not common for all components.

Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Dec 27, 2024
1 parent 325307a commit d01680c
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/selenium-grid/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| components.router.imageTag | string | `nil` | Router image tag (this overwrites global.seleniumGrid.imageTag parameter) |
| components.router.imagePullPolicy | string | `"IfNotPresent"` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) |
| components.router.imagePullSecret | string | `""` | Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) |
| components.router.subPath | string | `""` | Custom sub path for Router |
| components.router.disableUI | bool | `false` | Disable the Grid UI |
| components.router.extraEnvironmentVariables | list | `[]` | Specify extra environment variables for Router |
| components.router.extraEnvFrom | list | `[]` | Specify extra environment variables from ConfigMap and Secret for Router |
Expand Down Expand Up @@ -284,7 +285,6 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
| components.sessionQueue.tolerations | list | `[]` | Tolerations for Session Queue pods |
| components.sessionQueue.nodeSelector | object | `{}` | Node selector for Session Queue pods |
| components.sessionQueue.priorityClassName | string | `""` | Priority class name for Session Queue pods |
| components.subPath | string | `""` | Custom sub path for all components |
| components.extraEnvironmentVariables | list | `[]` | Custom environment variables for all components |
| components.extraEnvFrom | list | `[]` | Custom environment variables by sourcing entire configMap, Secret, etc. for all components |
| hub.imageRegistry | string | `nil` | Registry to pull the image (this overwrites global.seleniumGrid.imageRegistry parameter) |
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ Graphql Url for internal monitoring exporter
{{- define "seleniumGrid.url.subPath" -}}
{{- $subPath := "" -}}
{{- if $.Values.isolateComponents -}}
{{- $subPath = default $subPath $.Values.components.subPath -}}
{{- $subPath = default $subPath $.Values.components.router.subPath -}}
{{- else -}}
{{- $subPath = default $subPath $.Values.hub.subPath -}}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/router-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ spec:
value: '{{ template "seleniumGrid.sessionQueue.fullname" . }}.{{ .Release.Namespace }}'
- name: SE_SESSION_QUEUE_PORT
value: {{ .Values.components.sessionQueue.port | quote }}
{{- with .Values.components.subPath }}
{{- with .Values.components.router.subPath }}
- name: SE_SUB_PATH
value: {{ include "utils.trimTrailingSlash" . | quote }}
{{- end }}
Expand Down
5 changes: 2 additions & 3 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ components:
# -- Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/)
imagePullSecret: ""

# -- Custom sub path for Router
subPath: ""
# -- Disable the Grid UI
disableUI: false
# -- Specify extra environment variables for Router
Expand Down Expand Up @@ -691,9 +693,6 @@ components:
# -- Priority class name for Session Queue pods
priorityClassName: ""

# -- Custom sub path for all components
subPath: ""

# -- Custom environment variables for all components
extraEnvironmentVariables: []
# - name: SE_JAVA_OPTS
Expand Down
3 changes: 2 additions & 1 deletion tests/charts/ci/base-subPath-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ hub:
subPath: *gridAppRoot

components:
subPath: *gridAppRoot
router:
subPath: *gridAppRoot
3 changes: 2 additions & 1 deletion tests/charts/refValues/sample-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ hub:
subPath: *gridAppRoot

components:
subPath: *gridAppRoot
router:
subPath: *gridAppRoot

chromeNode:
extraEnvironmentVariables: &extraEnvironmentVariablesNodes
Expand Down
2 changes: 1 addition & 1 deletion tests/charts/refValues/simplex-minikube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ hub:
serviceType: NodePort

components:
subPath: *gridAppRoot
router:
subPath: *gridAppRoot
serviceType: NodePort

chromeNode:
Expand Down
2 changes: 1 addition & 1 deletion tests/charts/templates/render/dummy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ ingress:
isolateComponents: true

components:
subPath: *gridAppRoot
router:
subPath: *gridAppRoot
disableUI: true
annotations:
"restartOnUpdate": "true"
Expand Down
2 changes: 1 addition & 1 deletion tests/charts/templates/render/dummy_solution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ selenium-grid:
isolateComponents: true

components:
subPath: *gridAppRoot
router:
subPath: *gridAppRoot
disableUI: true
serviceType: NodePort
extraEnvironmentVariables:
Expand Down

0 comments on commit d01680c

Please sign in to comment.