Skip to content

Commit fb28659

Browse files
test
Signed-off-by: chahat sagar <[email protected]>
1 parent a1632b2 commit fb28659

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

scripts/build/build-hotrod-image.sh

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,16 @@ if [[ "${runtime}" == "k8s" ]]; then
141141
echo "Available Kind clusters:"
142142
kind get clusters || echo "No clusters found"
143143

144-
# Load into Kind cluster - try with and without cluster name
145-
if kind get clusters | grep -q "kind"; then
146-
echo "Loading images into 'kind' cluster..."
147-
kind load docker-image jaegertracing/all-in-one:latest --name kind
148-
kind load docker-image jaegertracing/example-hotrod:latest --name kind
144+
# Get the actual cluster name
145+
CLUSTER_NAME=$(kind get clusters | head -n1)
146+
if [[ -n "$CLUSTER_NAME" ]]; then
147+
echo "Loading images into '$CLUSTER_NAME' cluster..."
148+
kind load docker-image jaegertracing/all-in-one:latest --name "$CLUSTER_NAME"
149+
kind load docker-image jaegertracing/example-hotrod:latest --name "$CLUSTER_NAME"
149150
else
150-
# Try without specifying cluster name (uses default)
151-
echo "Loading images into default cluster..."
152-
kind load docker-image jaegertracing/all-in-one:latest
153-
kind load docker-image jaegertracing/example-hotrod:latest
151+
echo "No Kind clusters found!"
152+
exit 1
154153
fi
155-
kind load docker-image jaegertracing/all-in-one:latest
156-
kind load docker-image jaegertracing/example-hotrod:latest
157154

158155
bash ./examples/oci/deploy-all.sh local
159156
kubectl wait --for=condition=available --timeout=180s deployment/jaeger-hotrod

0 commit comments

Comments
 (0)