Matteo Scandolo | d82d1de | 2021-04-06 14:55:58 -0700 | [diff] [blame] | 1 | // This keyword will get all the kubernetes pods info needed for debugging |
| 2 | // the only parameter required is the destination folder to store the collected information |
| 3 | def call(String dest) { |
| 4 | sh """ |
| 5 | mkdir -p ${dest} |
| 6 | kubectl get pods --all-namespaces -o wide | tee ${dest}/pods.txt || true |
| 7 | kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\n'}" | sort | uniq | tee ${dest}/pod-images.txt || true |
| 8 | kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.imageID}{'\\n'}" | sort | uniq | tee ${dest}/pod-imagesId.txt || true |
| 9 | kubectl describe pods --all-namespaces -l app.kubernetes.io/part-of=voltha > ${dest}/voltha-pods-describe.txt |
| 10 | kubectl describe pods --all-namespaces -l app=onos-classic > ${dest}/onos-pods-describe.txt |
| 11 | helm ls --all-namespaces | tee ${dest}/helm-charts.txt |
| 12 | """ |
| 13 | } |