@@ -337,7 +337,7 @@ def camelCaseify(s):
337337 "subPath" : file_key ,
338338 "name" : "files" ,
339339 }
340- volume_mounts . update ({ f"{ idx } -files" : volume_mount })
340+ volume_mounts [ f"{ idx } -files" ] = volume_mount
341341
342342# Inject extraVolumes / extraVolumeMounts
343343extra_volumes = get_config ("singleuser.storage.extraVolumes" , default = {})
@@ -346,19 +346,19 @@ def camelCaseify(s):
346346 volumes .update [key ] = volume
347347elif isinstance (extra_volumes , list ):
348348 for volume in extra_volumes :
349- volumes . update ({ volume ["name" ]: volume })
349+ volumes [ volume ["name" ]] = volume
350350
351351extra_volume_mounts = get_config ("singleuser.storage.extraVolumeMounts" , default = {})
352352if isinstance (extra_volume_mounts , dict ):
353353 for key , volume_mount in extra_volume_mounts .items ():
354- volume_mounts . update ({ key : volume_mount })
354+ volume_mounts [ key ] = volume_mount
355355elif isinstance (extra_volume_mounts , list ):
356356 # If extraVolumeMounts is a list, we need to add them to the volume_mounts
357357 # dictionary with a unique key.
358358 # Since volume mount's name is not guaranteed to be unique, we use the index
359359 # as part of the key.
360360 for idx , volume_mount in enumerate (extra_volume_mounts ):
361- volume_mounts . update ({ f"{ idx } -{ volume_mount ['name' ]} " : volume_mount })
361+ volume_mounts [ f"{ idx } -{ volume_mount ['name' ]} " ] = volume_mount
362362
363363c .KubeSpawner .volumes = volumes
364364c .KubeSpawner .volume_mounts = volume_mounts
0 commit comments