File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616def provision (instance_id : str , details : ProvisionDetails ):
1717 with InstanceLock (instance_id ):
1818 chart_path = get_chart_path (instance_id )
19+ if os .path .exists (f'{ chart_path } /requirements.lock' ):
20+ args = [
21+ "dependency" ,
22+ "update" ,
23+ "--skip-refresh" ,
24+ chart_path ,
25+ ]
26+ command ("helm" , * args )
1927 values_file = os .path .join (get_plan_path (instance_id ), "values.yaml" )
2028 args = [
2129 "install" ,
@@ -43,7 +51,6 @@ def provision(instance_id: str, details: ProvisionDetails):
4351 data ["last_operation" ]["state" ] = OperationState .SUCCEEDED .value
4452 data ["last_operation" ]["description" ] = (
4553 "provision succeeded at %s" % time .time ())
46- print (data )
4754 dump_instance_meta (instance_id , data )
4855
4956
@@ -127,7 +134,12 @@ def bind(instance_id: str,
127134 success_flag = True
128135 errors = []
129136 for _ in credential_template ['credential' ]:
130- status , val = get_cred_value (details .context ["namespace" ], _ ['valueFrom' ]) # noqa
137+ if _ .get ('valueFrom' ):
138+ status , val = get_cred_value (details .context ["namespace" ], _ ['valueFrom' ]) # noqa
139+ elif _ .get ('value' ):
140+ status , val = 0 , _ ['value' ]
141+ else :
142+ status , val = - 1 , 'invalid value'
131143 if status != 0 :
132144 success_flag = False
133145 errors .append (val )
You can’t perform that action at this time.
0 commit comments