Skip to content

Commit 365c106

Browse files
committed
K8s: Fix template issue on Helm version v3.18.0
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent cc36ea9 commit 365c106

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/helm-chart-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
test-strategy: playwright_connect_grid
122122
- k8s-version: 'v1.33.1'
123123
cluster: 'minikube'
124-
helm-version: 'v3.17.3'
124+
helm-version: 'v3.18.0'
125125
docker-version: '26.1.4'
126126
python-version: '3.10'
127127
test-upgrade: true

charts/selenium-grid/templates/_helpers.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,8 @@ Define terminationGracePeriodSeconds of the node pod.
877877
2. IF node.terminationGracePeriodSeconds is greater than autoscaling.terminationGracePeriodSeconds, use node.terminationGracePeriodSeconds
878878
*/}}
879879
{{- define "seleniumGrid.node.terminationGracePeriodSeconds" -}}
880-
{{- $autoscalingPeriod := default 0 .Values.autoscaling.terminationGracePeriodSeconds -}}
881-
{{- $nodePeriod := default 0 .node.terminationGracePeriodSeconds -}}
880+
{{- $autoscalingPeriod := default 0 .Values.autoscaling.terminationGracePeriodSeconds | int -}}
881+
{{- $nodePeriod := default 0 .node.terminationGracePeriodSeconds | int -}}
882882
{{- $period := $nodePeriod -}}
883883
{{- if and (eq .Values.autoscaling.scalingType "deployment") (eq (include "seleniumGrid.useKEDA" $) "true") -}}
884884
{{- $period = ternary $nodePeriod $autoscalingPeriod (gt $nodePeriod $autoscalingPeriod) -}}

tests/charts/make/chart_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ if [ "${SELENIUM_GRID_AUTOSCALING}" = "true" ] && [ "${CLEAR_POD_HISTORY}" = "tr
260260
"
261261
fi
262262

263-
if [ "${CHART_ENABLE_INGRESS_HOSTNAME}" = "true" ]; then
263+
if [ "${CHART_ENABLE_INGRESS_HOSTNAME}" = "true" ] && [ "${RENDER_HELM_TEMPLATE_ONLY}" != "true" ]; then
264264
if [[ ! $(cat /etc/hosts) == *"${HOSTNAME_ADDRESS}"* ]]; then
265265
sudo -- sh -c -e "echo \"$(hostname -I | cut -d' ' -f1) ${HOSTNAME_ADDRESS}\" >> /etc/hosts"
266266
fi

0 commit comments

Comments
 (0)