File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed
Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -685,8 +685,8 @@ class Container:
685685 """
686686 Name of the container.
687687 """
688- image_pull_policy : ContainerImagePullPolicyEnum = (
689- ContainerImagePullPolicyEnum . IF_NOT_PRESENT
688+ image_pull_policy : ContainerImagePullPolicyEnum = field (
689+ default_factory = lambda : envs . GPUSTACK_RUNTIME_DEPLOY_IMAGE_PULL_POLICY ,
690690 )
691691 """
692692 Image pull policy of the container.
Original file line number Diff line number Diff line change 5353_LABEL_COMPONENT = f"{ envs .GPUSTACK_RUNTIME_DEPLOY_LABEL_PREFIX } /component"
5454
5555
56- class KubernetesWorkloadServiceType (str , Enum ):
56+ class KubernetesWorkloadServiceTypeEnum (str , Enum ):
5757 """
5858 Types for Kubernetes Service.
5959 """
@@ -84,7 +84,7 @@ class KubernetesWorkloadPlan(WorkloadPlan):
8484 Attributes:
8585 domain_suffix (str):
8686 Domain suffix for the cluster. Default is "cluster.local".
87- service_type (KubernetesWorkloadServiceType ):
87+ service_type (KubernetesWorkloadServiceTypeEnum ):
8888 Service type for the workload. Default is CLUSTER_IP.
8989 resource_key_runtime_env_mapping: (dict[str, str]):
9090 Mapping from resource names to environment variable names for device allocation,
@@ -130,7 +130,7 @@ class KubernetesWorkloadPlan(WorkloadPlan):
130130 """
131131 Domain suffix for the cluster.
132132 """
133- service_type : KubernetesWorkloadServiceType = field (
133+ service_type : KubernetesWorkloadServiceTypeEnum = field (
134134 default_factory = lambda : envs .GPUSTACK_RUNTIME_KUBERNETES_SERVICE_TYPE ,
135135 )
136136 """
Original file line number Diff line number Diff line change 129129 """
130130 Correct the gpustack-runner image by rendering it with the host's detection.
131131 """
132+ GPUSTACK_RUNTIME_DEPLOY_IMAGE_PULL_POLICY : str | None = None
133+ """
134+ Image pull policy for the deployer (e.g., Always, IfNotPresent, Never).
135+ """
132136 GPUSTACK_RUNTIME_DEPLOY_LABEL_PREFIX : str | None = None
133137 """
134138 Label prefix for the deployer.
313317 "GPUSTACK_RUNTIME_DEPLOY_CORRECT_RUNNER_IMAGE" : lambda : to_bool (
314318 getenv ("GPUSTACK_RUNTIME_DEPLOY_CORRECT_RUNNER_IMAGE" , "1" ),
315319 ),
320+ "GPUSTACK_RUNTIME_DEPLOY_IMAGE_PULL_POLICY" : lambda : choice (
321+ getenv (
322+ "GPUSTACK_RUNTIME_DEPLOY_IMAGE_PULL_POLICY" ,
323+ "IfNotPresent" ,
324+ ),
325+ options = ["Always" , "IfNotPresent" , "Never" ],
326+ default = "IfNotPresent" ,
327+ ),
316328 "GPUSTACK_RUNTIME_DEPLOY_LABEL_PREFIX" : lambda : getenv (
317329 "GPUSTACK_RUNTIME_DEPLOY_LABEL_PREFIX" ,
318330 "runtime.gpustack.ai" ,
You can’t perform that action at this time.
0 commit comments