@@ -148,6 +148,31 @@ jobs:
148148 run : ct install --debug --config ct.yaml --print-config --charts ${{ needs.lint-test.outputs.chart_name }}
149149 if : ${{ needs.lint-test.outputs.changed == 'true' }}
150150
151+ - name : Verify Pod Status
152+ if : ${{ needs.lint-test.outputs.changed == 'true' }}
153+ run : |
154+ echo "Waiting for pods to be ready..."
155+ kubectl wait --for=condition=Ready pods --all -n chart-testing --timeout=300s
156+
157+ echo "Checking pod status..."
158+ if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.phase}' | tr ' ' '\n' | grep -v "Running" | wc -l) -ne 0 ]]; then
159+ echo "Some pods are not running:"
160+ kubectl get pods -n chart-testing
161+ kubectl describe pods -n chart-testing
162+ exit 1
163+ fi
164+
165+ echo "Checking for pod restarts..."
166+ if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.containerStatuses[*].restartCount}' | tr ' ' '\n' | grep -v "^0$" | wc -l) -ne 0 ]]; then
167+ echo "Some pods have restarted:"
168+ kubectl get pods -n chart-testing
169+ kubectl describe pods -n chart-testing
170+ exit 1
171+ fi
172+
173+ echo "All pods are running properly!"
174+ kubectl get pods -n chart-testing
175+
151176 - name : Setup tmate session
152177 uses : mxschmitt/action-tmate@v3
153178 timeout-minutes : 10
@@ -198,6 +223,31 @@ jobs:
198223 run : ct install --debug --config ct.yaml --print-config --charts ${{ needs.lint-test.outputs.chart_name }}
199224 if : ${{ needs.lint-test.outputs.changed == 'true' }}
200225
226+ - name : Verify Pod Status
227+ if : ${{ needs.lint-test.outputs.changed == 'true' }}
228+ run : |
229+ echo "Waiting for pods to be ready..."
230+ kubectl wait --for=condition=Ready pods --all -n chart-testing --timeout=300s
231+
232+ echo "Checking pod status..."
233+ if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.phase}' | tr ' ' '\n' | grep -v "Running" | wc -l) -ne 0 ]]; then
234+ echo "Some pods are not running:"
235+ kubectl get pods -n chart-testing
236+ kubectl describe pods -n chart-testing
237+ exit 1
238+ fi
239+
240+ echo "Checking for pod restarts..."
241+ if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.containerStatuses[*].restartCount}' | tr ' ' '\n' | grep -v "^0$" | wc -l) -ne 0 ]]; then
242+ echo "Some pods have restarted:"
243+ kubectl get pods -n chart-testing
244+ kubectl describe pods -n chart-testing
245+ exit 1
246+ fi
247+
248+ echo "All pods are running properly!"
249+ kubectl get pods -n chart-testing
250+
201251 - name : Setup tmate session
202252 uses : mxschmitt/action-tmate@v3
203253 timeout-minutes : 10
@@ -248,6 +298,31 @@ jobs:
248298 run : ct install --debug --config ct.yaml --print-config --charts ${{ needs.lint-test.outputs.chart_name }}
249299 if : ${{ needs.lint-test.outputs.changed == 'true' }}
250300
301+ - name : Verify Pod Status
302+ if : ${{ needs.lint-test.outputs.changed == 'true' }}
303+ run : |
304+ echo "Waiting for pods to be ready..."
305+ kubectl wait --for=condition=Ready pods --all -n chart-testing --timeout=300s
306+
307+ echo "Checking pod status..."
308+ if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.phase}' | tr ' ' '\n' | grep -v "Running" | wc -l) -ne 0 ]]; then
309+ echo "Some pods are not running:"
310+ kubectl get pods -n chart-testing
311+ kubectl describe pods -n chart-testing
312+ exit 1
313+ fi
314+
315+ echo "Checking for pod restarts..."
316+ if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.containerStatuses[*].restartCount}' | tr ' ' '\n' | grep -v "^0$" | wc -l) -ne 0 ]]; then
317+ echo "Some pods have restarted:"
318+ kubectl get pods -n chart-testing
319+ kubectl describe pods -n chart-testing
320+ exit 1
321+ fi
322+
323+ echo "All pods are running properly!"
324+ kubectl get pods -n chart-testing
325+
251326 - name : Setup tmate session
252327 uses : mxschmitt/action-tmate@v3
253328 timeout-minutes : 10
@@ -298,6 +373,31 @@ jobs:
298373 run : ct install --debug --config ct.yaml --print-config --charts ${{ needs.lint-test.outputs.chart_name }}
299374 if : ${{ needs.lint-test.outputs.changed == 'true' }}
300375
376+ - name : Verify Pod Status
377+ if : ${{ needs.lint-test.outputs.changed == 'true' }}
378+ run : |
379+ echo "Waiting for pods to be ready..."
380+ kubectl wait --for=condition=Ready pods --all -n chart-testing --timeout=300s
381+
382+ echo "Checking pod status..."
383+ if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.phase}' | tr ' ' '\n' | grep -v "Running" | wc -l) -ne 0 ]]; then
384+ echo "Some pods are not running:"
385+ kubectl get pods -n chart-testing
386+ kubectl describe pods -n chart-testing
387+ exit 1
388+ fi
389+
390+ echo "Checking for pod restarts..."
391+ if [[ $(kubectl get pods -n chart-testing -o jsonpath='{.items[*].status.containerStatuses[*].restartCount}' | tr ' ' '\n' | grep -v "^0$" | wc -l) -ne 0 ]]; then
392+ echo "Some pods have restarted:"
393+ kubectl get pods -n chart-testing
394+ kubectl describe pods -n chart-testing
395+ exit 1
396+ fi
397+
398+ echo "All pods are running properly!"
399+ kubectl get pods -n chart-testing
400+
301401 - name : Setup tmate session
302402 uses : mxschmitt/action-tmate@v3
303403 timeout-minutes : 10
0 commit comments