fix: set imagePullPolicy=Always for kind deployments

Kind deployments used imagePullPolicy=None (defaults to IfNotPresent),
which means the kind node caches images by tag and never re-pulls from
the local registry. After a container rebuild + registry push, the pod
keeps using the stale cached image.

Set Always for all deployment types so k8s re-pulls on every pod
restart. With a local registry this adds negligible overhead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
A. F. Dudley 2026-03-17 17:44:35 +00:00
parent 72aabe7d9a
commit 0bbb51067c

View File

@ -362,7 +362,7 @@ class K8sDeployer(Deployer):
return
# Process compose files into a Deployment
deployment = self.cluster_info.get_deployment(
image_pull_policy=None if self.is_kind() else "Always"
image_pull_policy="Always"
)
# Create the k8s objects
if opts.o.debug:
@ -400,7 +400,7 @@ class K8sDeployer(Deployer):
def _create_jobs(self):
# Process job compose files into k8s Jobs
jobs = self.cluster_info.get_jobs(
image_pull_policy=None if self.is_kind() else "Always"
image_pull_policy="Always"
)
for job in jobs:
if opts.o.debug:
@ -820,7 +820,7 @@ class K8sDeployer(Deployer):
# Non-Helm path: create job from ClusterInfo
self.connect_api()
jobs = self.cluster_info.get_jobs(
image_pull_policy=None if self.is_kind() else "Always"
image_pull_policy="Always"
)
# Find the matching job by name
target_name = f"{self.cluster_info.app_name}-job-{job_name}"