File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
gpustack_runtime/deployer Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -973,10 +973,13 @@ def _prepare_create(self):
973973 item .split ("=" , 1 ) for item in self_image .attrs ["Config" ].get ("Env" , [])
974974 )
975975 mirrored_envs : dict [str , str ] = {
976- # Only keep envs that are different from image defaults .
976+ # Filter out gpustack-internal envs and same-as- image envs .
977977 k : v
978978 for k , v in self_container_envs .items ()
979- if k not in self_image_envs or v != self_image_envs [k ]
979+ if (
980+ not k .startswith ("GPUSTACK_" )
981+ and (k not in self_image_envs or v != self_image_envs [k ])
982+ )
980983 }
981984 if igs := envs .GPUSTACK_RUNTIME_DEPLOY_MIRRORED_DEPLOYMENT_IGNORE_ENVIRONMENTS :
982985 mirrored_envs = {
Original file line number Diff line number Diff line change @@ -1031,9 +1031,13 @@ def _prepare_create(self):
10311031 mirrored_runtime_class_name : str = self_pod .spec .runtime_class_name or ""
10321032 ## - Container envs
10331033 mirrored_envs : list [kubernetes .client .V1EnvVar ] = [
1034+ # Filter out gpustack-internal envs and cross-namespace secret/envref envs.
10341035 e
10351036 for e in self_container .env or []
1036- if (not e .value_from or in_same_namespace )
1037+ if (
1038+ not e .name .startswith ("GPUSTACK_" )
1039+ and (not e .value_from or in_same_namespace )
1040+ )
10371041 ]
10381042 if igs := envs .GPUSTACK_RUNTIME_DEPLOY_MIRRORED_DEPLOYMENT_IGNORE_ENVIRONMENTS :
10391043 mirrored_envs = [
You can’t perform that action at this time.
0 commit comments