File tree 3 files changed +5
-0
lines changed
3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ def create_app_wrapper(self):
145
145
gpu = self .config .num_gpus
146
146
workers = self .config .num_workers
147
147
template = self .config .template
148
+ template_update_dict = self .config .template_update_dict
148
149
image = self .config .image
149
150
appwrapper = self .config .appwrapper
150
151
env = self .config .envs
@@ -176,6 +177,7 @@ def create_app_wrapper(self):
176
177
labels = labels ,
177
178
volumes = volumes ,
178
179
volume_mounts = volume_mounts ,
180
+ template_update_dict = template_update_dict
179
181
)
180
182
181
183
# creates a new cluster with the provided or default spec
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ class ClusterConfiguration:
46
46
max_memory : typing .Union [int , str ] = 2
47
47
num_gpus : int = 0
48
48
template : str = f"{ dir } /templates/base-template.yaml"
49
+ template_update_dict = {}
49
50
appwrapper : bool = False
50
51
envs : dict = field (default_factory = dict )
51
52
image : str = ""
Original file line number Diff line number Diff line change @@ -300,8 +300,10 @@ def generate_appwrapper(
300
300
labels ,
301
301
volumes : list [client .V1Volume ],
302
302
volume_mounts : list [client .V1VolumeMount ],
303
+ template_update_dict = {}
303
304
):
304
305
cluster_yaml = read_template (template )
306
+ cluster_yaml .update (template_update_dict )
305
307
appwrapper_name , cluster_name = gen_names (name )
306
308
update_names (cluster_yaml , cluster_name , namespace )
307
309
update_nodes (
You can’t perform that action at this time.
0 commit comments