From a1082c2aa127c3fc381fb9d92cef19ef8ead61c7 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Fri, 22 Dec 2023 22:54:57 +0700 Subject: [PATCH] fix(chart): Remove trailing slash from default subPath value (#2076) --- charts/selenium-grid/Chart.yaml | 2 +- charts/selenium-grid/templates/_helpers.tpl | 2 +- charts/selenium-grid/templates/hub-deployment.yaml | 4 +++- charts/selenium-grid/templates/router-deployment.yaml | 4 +++- charts/selenium-grid/values.yaml | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/charts/selenium-grid/Chart.yaml b/charts/selenium-grid/Chart.yaml index 9792a20b1..63dad9e7b 100644 --- a/charts/selenium-grid/Chart.yaml +++ b/charts/selenium-grid/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: selenium-grid description: A Helm chart for creating a Selenium Grid Server in Kubernetes type: application -version: 0.26.3 +version: 0.26.4 appVersion: 4.16.1-20231219 icon: https://github.com/SeleniumHQ/docker-selenium/raw/trunk/logo.png dependencies: diff --git a/charts/selenium-grid/templates/_helpers.tpl b/charts/selenium-grid/templates/_helpers.tpl index db7a8cedc..7902d1938 100644 --- a/charts/selenium-grid/templates/_helpers.tpl +++ b/charts/selenium-grid/templates/_helpers.tpl @@ -400,7 +400,7 @@ Get the url of the grid. If the external url can be figured out from the ingress {{- end -}} {{- define "seleniumGrid.url.subPath" -}} -{{- $subPath := "/" -}} +{{- $subPath := "" -}} {{- if $.Values.isolateComponents -}} {{- $subPath = default $subPath $.Values.components.subPath -}} {{- else -}} diff --git a/charts/selenium-grid/templates/hub-deployment.yaml b/charts/selenium-grid/templates/hub-deployment.yaml index 14345e6c8..b9b28a446 100644 --- a/charts/selenium-grid/templates/hub-deployment.yaml +++ b/charts/selenium-grid/templates/hub-deployment.yaml @@ -65,8 +65,10 @@ spec: failureThreshold: {{ .Values.hub.readinessProbe.failureThreshold }} {{- end }} env: + {{- with .Values.hub.subPath }} - name: SE_SUB_PATH - value: {{ .Values.hub.subPath }} + value: {{ . | quote }} + {{- end }} {{- if eq .Values.basicAuth.enabled true}} - name: ROUTER_USERNAME value: {{ .Values.basicAuth.username }} diff --git a/charts/selenium-grid/templates/router-deployment.yaml b/charts/selenium-grid/templates/router-deployment.yaml index 70ebe9bc3..cc0cbbf29 100644 --- a/charts/selenium-grid/templates/router-deployment.yaml +++ b/charts/selenium-grid/templates/router-deployment.yaml @@ -45,8 +45,10 @@ spec: value: {{ template "seleniumGrid.sessionQueue.fullname" . }} - name: SE_SESSION_QUEUE_PORT value: {{ .Values.components.sessionQueue.port | quote }} + {{- with .Values.components.subPath }} - name: SE_SUB_PATH - value: {{ .Values.components.subPath }} + value: {{ . | quote }} + {{- end }} {{- if eq .Values.basicAuth.enabled true}} - name: ROUTER_USERNAME value: {{ .Values.basicAuth.username }} diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index bfe5eb011..b6e7ef07c 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -275,7 +275,7 @@ components: priorityClassName: "" # Custom sub path for all components - subPath: / + subPath: "" # Custom environment variables for all components extraEnvironmentVariables: @@ -338,7 +338,7 @@ hub: periodSeconds: 10 successThreshold: 1 # Custom sub path for the hub deployment - subPath: / + subPath: "" # Custom environment variables for selenium-hub extraEnvironmentVariables: # - name: SE_JAVA_OPTS