File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1+ import re
12import subprocess
2- import uuid
33
44import yaml
55from celery import shared_task
1717
1818logger = get_logger (__name__ )
1919
20+ CHART_REGEX = re .compile (r"^(?P<chart>.+):(?P<version>.+)$" )
21+
2022
2123@app .task
2224def delete_old_objects ():
@@ -194,9 +196,15 @@ def deploy_resource(serialized_instance):
194196 logger .info ("Deploying resource for instance %s" , instance )
195197 values = instance .k8s_values
196198 release = values ["subdomain" ]
199+ chart : str = instance .chart
197200 if "ghcr" in instance .chart :
198201 version = instance .chart .split (":" )[- 1 ]
199202 chart = "oci://" + instance .chart .split (":" )[0 ]
203+ elif chart .startswith ("oci://" ):
204+ match = CHART_REGEX .match (chart )
205+ if match :
206+ chart = match .group ("chart" )
207+ version = match .group ("version" )
200208 else :
201209 version = None
202210 chart = instance .chart
Original file line number Diff line number Diff line change 3939 {
4040 "fields" : {
4141 "category" : " develop" ,
42- "chart" : " oci://registry-1.docker.io/bitnamicharts/mlflow" ,
42+ "chart" : " oci://registry-1.docker.io/bitnamicharts/mlflow:2.5.2 " ,
4343 "created_on" : " 2025-02-12T21:34:37.815Z" ,
4444 "description" : " " ,
4545 "name" : " MLFlow" ,
You can’t perform that action at this time.
0 commit comments