You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DEPLOYMENT=$(tess kubectl --context="$CLUSTER" -n "$NAMESPACE" get pod "$POD" -o jsonpath='{.metadata.ownerReferences[?(@.kind=="ReplicaSet")].name}'| sed 's/-[a-z0-9]*$//')
48
+
if [[ -z"$DEPLOYMENT" ]];then
49
+
echo"No deployment found for pod $POD. Skipping..."
50
+
continue
51
+
elif! [[ $DEPLOYMENT=~$DEPLOYMENT_REGEX ]];then
52
+
echo"Skipping pod $POD as its deployment $DEPLOYMENT does not match the expected pattern."
53
+
continue
54
+
fi
34
55
echo"Processing deployment $DEPLOYMENT pod $POD..."
35
56
36
57
# PRE-CHECK
@@ -40,6 +61,11 @@ for i in $(seq "$start_idx" "$DEPLOYMENT_COUNT"); do
40
61
continue
41
62
fi
42
63
64
+
if [[ $process_cnt-ge$DEPLOYMENT_COUNT ]];then
65
+
echo"Reached the maximum number of deployments to process: $DEPLOYMENT_COUNT. Stopping further processing."
66
+
break
67
+
fi
68
+
43
69
# Step 1: Update deployment strategy to Recreate and set sm-app image to refactor image
44
70
echo"[Step 1]. Updating deployment $DEPLOYMENT strategy to Recreate and setting sm-app image to $REFACTOR_IMAGE..."
0 commit comments