Skip to content

Commit 6b622de

Browse files
fix(local): load auth-callout per cluster (#20)
Always load the freshly built auth-callout:latest image into the selected Kind cluster and restart auth-callout pods after Helm upgrade so local latest-tag deployments pick up the cluster image. Signed-off-by: Frank Spitulski <fspitulski@nvidia.com>
1 parent 5130feb commit 6b622de

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

local/nats/deploy.sh

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -385,14 +385,10 @@ if [ ! -f "${AUTH_CALLOUT_DIR}/Makefile" ]; then
385385
echo "ERROR: Makefile not found at ${AUTH_CALLOUT_DIR}/Makefile" >&2
386386
exit 1
387387
fi
388-
OLD_IMAGE_ID=$(docker images -q auth-callout:latest 2>/dev/null)
389388
make -C "${AUTH_CALLOUT_DIR}" docker-build
390-
NEW_IMAGE_ID=$(docker images -q auth-callout:latest 2>/dev/null)
391389

392-
if [ "${OLD_IMAGE_ID}" != "${NEW_IMAGE_ID}" ]; then
393-
echo "Loading new auth-callout image to kind..."
394-
kind load docker-image auth-callout:latest --name "${cluster}"
395-
fi
390+
echo "Loading auth-callout image to kind..."
391+
kind load docker-image auth-callout:latest --name "${cluster}"
396392

397393
# Install Helm chart
398394
echo "Installing NATS Event Bus Helm chart..."
@@ -419,11 +415,9 @@ helm upgrade --install nats-event-bus "${CHART_DIR}" \
419415
--force-conflicts \
420416
--cleanup-on-fail
421417

422-
# Restart auth-callout if image changed
423-
if [ "${OLD_IMAGE_ID}" != "${NEW_IMAGE_ID}" ]; then
424-
echo "Restarting auth-callout pods..."
425-
kubectl delete pods -l app.kubernetes.io/name=auth-callout -n ${namespace} --context="${context}" --ignore-not-found=true
426-
fi
418+
# Restart auth-callout so pods use the image just loaded into this Kind cluster.
419+
echo "Restarting auth-callout pods..."
420+
kubectl delete pods -l app.kubernetes.io/name=auth-callout -n ${namespace} --context="${context}" --ignore-not-found=true
427421

428422
# Wait for readiness - use rollout status for deployments/statefulsets to avoid race conditions
429423
echo "Waiting for NATS pods to be ready..."

0 commit comments

Comments
 (0)