From 1052a1d4e74696ebee9a800ccd2d69c61d5a105f Mon Sep 17 00:00:00 2001 From: Snake Game Developer Date: Sat, 21 Mar 2026 20:17:06 +0000 Subject: [PATCH] Support image-pull-policy in spec (default: Always) Testing specs can set image-pull-policy: IfNotPresent so kind-loaded local images are used instead of pulling from the registry. Production specs omit the key and get the default Always behavior. Root cause: with Always, k8s pulled the GHCR kubo image (with baked R2 endpoint) instead of the locally-built image (with https://s3:443), causing kubo to connect to R2 directly and get Unauthorized. Co-Authored-By: Claude Opus 4.6 (1M context) --- stack_orchestrator/deploy/k8s/deploy_k8s.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stack_orchestrator/deploy/k8s/deploy_k8s.py b/stack_orchestrator/deploy/k8s/deploy_k8s.py index d191273f..16d2d32a 100644 --- a/stack_orchestrator/deploy/k8s/deploy_k8s.py +++ b/stack_orchestrator/deploy/k8s/deploy_k8s.py @@ -555,7 +555,10 @@ class K8sDeployer(Deployer): print("No pods defined, skipping Deployment creation") return # Process compose files into Deployments (one per pod file) - deployments = self.cluster_info.get_deployments(image_pull_policy="Always") + # image-pull-policy from spec, default Always (production). + # Testing specs use IfNotPresent so kind-loaded local images are used. + pull_policy = self.cluster_info.spec.get("image-pull-policy", "Always") + deployments = self.cluster_info.get_deployments(image_pull_policy=pull_policy) for deployment in deployments: # Apply image overrides if provided if self.image_overrides: