diff --git a/charts/airbyte/files/sweep-pod.sh b/charts/airbyte/files/sweep-pod.sh index 15422f204a2f..1d5e56c42c74 100644 --- a/charts/airbyte/files/sweep-pod.sh +++ b/charts/airbyte/files/sweep-pod.sh @@ -1,7 +1,9 @@ #!/bin/bash get_worker_pods () { - kubectl -n ${KUBE_NAMESPACE} -L airbyte -l airbyte=worker-pod --field-selector status.phase!=Running get pods -o go-template --template '{{range .items}} {{.metadata.name}} {{.status.phase}} {{.metadata.creationTimestamp}}{{"\n"}}{{end}}' + kubectl -n ${KUBE_NAMESPACE} -L airbyte -l airbyte=worker-pod \ + --field-selector status.phase!=Running get pods \ + -o=jsonpath='{range .items[*]} {.metadata.name} {.status.phase} {.status.conditions[0].lastTransitionTime}{"\n"}{end}' } delete_worker_pod() { diff --git a/kube/resources/pod-sweeper.yaml b/kube/resources/pod-sweeper.yaml index ae5b4e2a40ae..dd752ac6ed69 100644 --- a/kube/resources/pod-sweeper.yaml +++ b/kube/resources/pod-sweeper.yaml @@ -7,7 +7,9 @@ data: #!/bin/bash get_worker_pods () { - kubectl -n ${KUBE_NAMESPACE} -L airbyte -l airbyte=worker-pod --field-selector status.phase!=Running get pods -o go-template --template '{{range .items}} {{.metadata.name}} {{.status.phase}} {{.metadata.creationTimestamp}}{{"\n"}}{{end}}' + kubectl -n ${KUBE_NAMESPACE} -L airbyte -l airbyte=worker-pod \ + --field-selector status.phase!=Running get pods \ + -o=jsonpath='{range .items[*]} {.metadata.name} {.status.phase} {.status.conditions[0].lastTransitionTime}{"\n"}{end}' } delete_worker_pod() {