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) <noreply@anthropic.com>afd-dumpster-local-testing
parent
f93541f7db
commit
1052a1d4e7
|
|
@ -555,7 +555,10 @@ class K8sDeployer(Deployer):
|
||||||
print("No pods defined, skipping Deployment creation")
|
print("No pods defined, skipping Deployment creation")
|
||||||
return
|
return
|
||||||
# Process compose files into Deployments (one per pod file)
|
# 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:
|
for deployment in deployments:
|
||||||
# Apply image overrides if provided
|
# Apply image overrides if provided
|
||||||
if self.image_overrides:
|
if self.image_overrides:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue