File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed
Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,23 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
183183{ {- printf " %s-init" (include " mlrun.db.fullname" .) | trunc 63 | trimSuffix " -" -} }
184184{ {- end -} }
185185
186+ { {/*
187+ Determine MySQL image tag based on MLRun appVersion.
188+ - If db.image.tag is explicitly set in values, use that (allows override)
189+ - Otherwise, use MySQL 8.0 for appVersion < 1.11.0, and MySQL 8.4 for appVersion >= 1.11.0
190+ */} }
191+ { {- define " mlrun.db.mysqlTag" -} }
192+ { {- if .Values.db.image.tag -} }
193+ { {- .Values.db.image.tag -} }
194+ { {- else -} }
195+ { {- if semverCompare " <1.11.0" .Chart.AppVersion -} }
196+ { {- print " 8.0" -} }
197+ { {- else -} }
198+ { {- print " 8.4" -} }
199+ { {- end -} }
200+ { {- end -} }
201+ { {- end -} }
202+
186203
187204{ {/*
188205This is to couple nuclio and mlrun charts, and comes to workaround the fact that the same
Original file line number Diff line number Diff line change 2828 terminationGracePeriodSeconds : 120
2929 initContainers :
3030 - name : init-mysql
31- image : " {{ .Values.db.image.repository }}:{{ .Values. db.image.tag }}"
31+ image : " {{ .Values.db.image.repository }}:{{ include " mlrun. db.mysqlTag" . }}"
3232 imagePullPolicy : {{ .Values.db.image.pullPolicy }}
3333 resources :
3434 {{- toYaml .Values.db.resources | nindent 12 }}
4747 - name : {{ template "mlrun.name" . }}-{{ .Values.db.name }}
4848 securityContext :
4949 {{- toYaml .Values.db.securityContext | nindent 12 }}
50- image : " {{ .Values.db.image.repository }}:{{ .Values. db.image.tag }}"
50+ image : " {{ .Values.db.image.repository }}:{{ include " mlrun. db.mysqlTag" . }}"
5151 imagePullPolicy : {{ .Values.db.image.pullPolicy }}
5252 command : ["/bin/bash", "/etc/config/mysql/v3io-mysql.sh"]
5353 ports :
Original file line number Diff line number Diff line change 395395
396396 image :
397397 repository : mysql
398- tag : " 8.4"
398+ # MySQL tag is automatically determined based on MLRun appVersion:
399+ # - MySQL 8.0 for appVersion < 1.11.0
400+ # - MySQL 8.4 for appVersion >= 1.11.0
401+ # Set this value explicitly to override the automatic selection
402+ tag : " "
399403 pullPolicy : IfNotPresent
400404 pullSecrets : []
401405
You can’t perform that action at this time.
0 commit comments