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
kubectl rollout status deployment/test-app -n capsule-test --timeout=60s
126
170
127
-
# Get the new pod name after restart
171
+
# Get the new pod name
128
172
POD_NAME=$(kubectl get pods -n capsule-test -l app=test-app -o jsonpath="{.items[0].metadata.name}")
173
+
echo "Pod name: $POD_NAME"
129
174
130
175
# Verify the volume mount exists in the pod
131
176
MOUNTS=$(kubectl get pod $POD_NAME -n capsule-test -o jsonpath='{.spec.containers[0].volumeMounts[*].name}')
132
177
echo "Pod volume mounts: $MOUNTS"
133
178
179
+
VERIFICATION_RESULT=0
134
180
if [[ $MOUNTS == *"capsule-test-config-1.0"* ]]; then
135
181
echo "✅ Capsule volume mount successfully added to pod!"
136
182
else
137
183
echo "❌ Capsule volume mount not found in pod"
138
-
exit 1
184
+
VERIFICATION_RESULT=1
139
185
fi
140
186
141
-
# Try to access the capsule data from the pod
142
-
kubectl exec $POD_NAME -n capsule-test -- ls -la /capsules/test-config/1.0/
187
+
# Verify mount path
188
+
MOUNT_PATH=$(kubectl get pod $POD_NAME -n capsule-test -o jsonpath='{.spec.containers[0].volumeMounts[?(@.name=="capsule-test-config-1.0")].mountPath}')
189
+
echo "Mount path: $MOUNT_PATH"
190
+
191
+
if [[ "$MOUNT_PATH" == "/capsules/test-config/1.0" ]]; then
192
+
echo "✅ Volume mounted at correct path!"
193
+
else
194
+
echo "❌ Volume mounted at incorrect path: $MOUNT_PATH"
0 commit comments