Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions haproxy_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ class CreateExAppPayload(ExAppName):
)
mount_points: list[CreateExAppMounts] = Field([], description="List of mount points for the container.")
resource_limits: dict[str, Any] = Field({}, description="Resource limits for the container.")
image_pull_policy: Literal["IfNotPresent", "Never", "Always"] = Field(
"IfNotPresent", description="Kubernetes imagePullPolicy of the ExApp container (Kubernetes backend only)."
)

@model_validator(mode="before")
@classmethod
Expand Down Expand Up @@ -2426,7 +2429,7 @@ def _k8s_build_deployment_manifest(payload: CreateExAppPayload, replicas: int) -
container: dict[str, Any] = {
"name": "app",
"image": payload.image_id,
"imagePullPolicy": "IfNotPresent",
"imagePullPolicy": payload.image_pull_policy,
"env": _k8s_parse_env(payload.environment_variables),
}

Expand Down Expand Up @@ -3044,7 +3047,7 @@ async def k8s_exapp_wait_for_start(request: web.Request):
)

# Fail fast on image pull errors.
if waiting_reason in ("ErrImagePull", "ImagePullBackOff", "InvalidImageName"):
if waiting_reason in ("ErrImagePull", "ImagePullBackOff", "ErrImageNeverPull", "InvalidImageName"):
wait_msg = container_statuses[0].get("state", {}).get("waiting", {}).get("message", "")
LOGGER.error(
"Deployment '%s' pod has image pull error: %s - %s",
Expand Down
Loading