From b51ebde557bef9b3fd611d5ba4613dbcb158fae4 Mon Sep 17 00:00:00 2001 From: zhangzujian Date: Fri, 19 Jan 2024 02:35:09 +0000 Subject: [PATCH] fix regex definition Signed-off-by: zhangzujian --- charts/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/templates/_helpers.tpl b/charts/templates/_helpers.tpl index 76d852515ed..7b473941e5c 100644 --- a/charts/templates/_helpers.tpl +++ b/charts/templates/_helpers.tpl @@ -37,7 +37,7 @@ Number of master nodes RollingUpdate {{- else -}} {{- $imageVersion := (index $ds.spec.template.spec.containers 0).image | splitList ":" | last | trimPrefix "v" -}} - {{- $versionRegex := "^(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)" -}} + {{- $versionRegex := `^(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)` -}} {{- if regexMatch $versionRegex $imageVersion -}} {{- if regexFind $versionRegex $imageVersion | semverCompare ">= 1.12.0" -}} RollingUpdate