@@ -50,7 +50,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
50
50
{ {/*
51
51
Selector labels for main backend. Note changes here will require deployment
52
52
recreation and incur downtime. The " app.kubernetes.io/instance" label should
53
- also be included in all deployments, so telemetry knows how to find logs.
53
+ also be included in all deployments, so telemetry knows how to find logs.
54
54
*/} }
55
55
{ {- define " retool.selectorLabels" -} }
56
56
app.kubernetes.io/name: { { include " retool.name" . } }
@@ -200,6 +200,8 @@ Usage: (include "retool.workflows.enabled" .)
200
200
*/} }
201
201
{ {- define " retool.workflows.enabled" -} }
202
202
{ {- $output := " " -} }
203
+ { {- $valid_retool_version_regexp := " ([0-9]+\\ .[0-9]+(\\ .[0-9]+)?(-[a-zA-Z0-9]+)?)" } }
204
+ { {- $retool_version_with_workflows := ( and ( regexMatch $valid_retool_version_regexp $.Values.image.tag ) ( semverCompare " >= 3.6.11-0" ( regexFind $valid_retool_version_regexp $.Values.image.tag ) ) ) } }
203
205
{ {- if or
204
206
(eq (toString .Values.workflows.enabled) " true" )
205
207
(eq (toString .Values.workflows.enabled) " false" )
@@ -213,7 +215,7 @@ Usage: (include "retool.workflows.enabled" .)
213
215
{ {- $output = " " -} }
214
216
{ {- else if eq .Values.image.tag " latest" -} }
215
217
{ {- $output = " 1" -} }
216
- { {- else if semverCompare " >= 3.6.11-0 " .Values.image.tag -} }
218
+ { {- else if $ retool_version_with_workflows -} }
217
219
{ {- $output = " 1" -} }
218
220
{ {- else -} }
219
221
{ {- $output = " " -} }
@@ -227,6 +229,8 @@ Usage: (include "retool.codeExecutor.enabled" .)
227
229
*/} }
228
230
{ {- define " retool.codeExecutor.enabled" -} }
229
231
{ {- $output := " " -} }
232
+ { {- $valid_retool_version_regexp := " ([0-9]+\\ .[0-9]+(\\ .[0-9]+)?(-[a-zA-Z0-9]+)?)" } }
233
+ { {- $retool_version_with_ce := ( and ( regexMatch $valid_retool_version_regexp (include " retool.codeExecutor.image.tag" .) ) ( semverCompare " >= 3.20.15-0" ( regexFind $valid_retool_version_regexp (include " retool.codeExecutor.image.tag" .) ) ) ) } }
230
234
{ {- if or
231
235
(eq (toString .Values.codeExecutor.enabled) " true" )
232
236
(eq (toString .Values.codeExecutor.enabled) " false" )
@@ -240,7 +244,7 @@ Usage: (include "retool.codeExecutor.enabled" .)
240
244
{ {- $output = " " -} }
241
245
{ {- else if (or (contains " stable" (include " retool.codeExecutor.image.tag" .)) (contains " edge" (include " retool.codeExecutor.image.tag" .))) -} }
242
246
{ {- $output = " 1" -} }
243
- { {- else if semverCompare " >= 3.20.15-0 " ( include " retool.codeExecutor.image.tag " .) -} }
247
+ { {- else if $ retool_version_with_ce -} }
244
248
{ {- $output = " 1" -} }
245
249
{ {- else -} }
246
250
{ {- $output = " " -} }
@@ -319,11 +323,13 @@ Usage: (template "retool.codeExecutor.image.tag" .)
319
323
{ {- if .Values.codeExecutor.image.tag -} }
320
324
{ {- .Values.codeExecutor.image.tag -} }
321
325
{ {- else if .Values.image.tag -} }
326
+ { {- $valid_retool_version_regexp := " ([0-9]+\\ .[0-9]+(\\ .[0-9]+)?(-[a-zA-Z0-9]+)?)" } }
327
+ { {- $retool_version_with_ce := ( and ( regexMatch $valid_retool_version_regexp $.Values.image.tag ) ( semverCompare " >= 3.20.15-0" ( regexFind $valid_retool_version_regexp $.Values.image.tag ) ) ) } }
322
328
{ {- if and (eq .Values.image.tag " latest" ) (eq (toString .Values.codeExecutor.enabled) " true" ) -} }
323
329
{ {- fail " If using image.tag=latest (not recommended, select an explicit tag instead) and enabling codeExecutor, explicitly set codeExecutor.image.tag" } }
324
330
{ {- else if (eq .Values.image.tag " latest" ) -} }
325
331
{ {- " " -} }
326
- { {- else if semverCompare " >= 3.20.15-0 " .Values.image.tag -} }
332
+ { {- else if $ retool_version_with_ce -} }
327
333
{ {- .Values.image.tag -} }
328
334
{ {- else -} }
329
335
{ {- " 1.1.0" -} }
@@ -332,3 +338,16 @@ Usage: (template "retool.codeExecutor.image.tag" .)
332
338
{ {- fail " Please set a value for .Values.image.tag" } }
333
339
{ {- end -} }
334
340
{ {- end -} }
341
+
342
+ { {- define " retool_version_with_java_dbconnector_opt_out" -} }
343
+ { {- $output := " " -} }
344
+ { {- $valid_retool_version_regexp := " ([0-9]+\\ .[0-9]+(\\ .[0-9]+)?(-[a-zA-Z0-9]+)?)" } }
345
+ { {- if not ( regexMatch $valid_retool_version_regexp .Values.image.tag ) -} }
346
+ { {- $output = " 1" -} }
347
+ { {- else if semverCompare " >= 3.93.0-0" ( regexFind $valid_retool_version_regexp .Values.image.tag ) -} }
348
+ { {- $output = " 1" -} }
349
+ { {- else -} }
350
+ { {- $output = " " -} }
351
+ { {- end -} }
352
+ { {- $output -} }
353
+ { {- end -} }
0 commit comments