blob: 28fc81d0911bc54d77aff8678ee5371f95d73350 [file] [log] [blame]
Matteo Scandolod82d1de2021-04-06 14:55:58 -07001// 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
3def 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}