Skip to content

Commit 8b84d8d

Browse files
committed
[IMP] Only use dev image with newer images
1 parent 3b4a957 commit 8b84d8d

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

charts/adhoc-odoo/v0.2.9/templates/_helpers.tpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ Get odoo mayor version.
3737
{{- printf "%s" (regexReplaceAll "^([0-9]+\\.[0-9]+)\\..*" .Values.image.tag "$1") }}
3838
{{- end }}
3939

40+
{{/*
41+
Get odoo minor version.
42+
*/}}
43+
{{- define "adhoc-odoo.odoo-minor-version" -}}
44+
{{- printf "%s" (regexReplaceAll "^[0-9][0-9]\\.[0-9]\\.([0-9][0-9][0-9][0-9])\\.([0-9][0-9])\\.([0-9][0-9]).*" .Values.image.tag "$1$2$3") }}
45+
{{- end }}
46+
47+
4048
{{/*
4149
Common labels
4250
*/}}

charts/adhoc-odoo/v0.2.9/templates/deployment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ spec:
5353
securityContext:
5454
{{- toYaml . | nindent 12 }}
5555
{{- end }}
56-
{{- if .Values.odoo.entrypoint.repos }}
56+
{{ $minorVersion := include "adhoc-odoo.odoo-minor-version" . | int }}
57+
{{ if and (gt $minorVersion 20250415) ( .Values.odoo.entrypoint.repos) }}
5758
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}.dev"
5859
{{- else }}
5960
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

0 commit comments

Comments
 (0)