From 053ea74b28429702fdfed56e6247922c50b36730 Mon Sep 17 00:00:00 2001 From: Davin Chia Date: Wed, 25 Jan 2023 09:54:36 +0800 Subject: [PATCH] Use the right label. (#21829) Part of 54c0ef1 switched the job labels from worker-pod to job-pod. This PR also updates the pod-sweeper to use these labels. With the wrong label, the pod sweeper was not sweeping the right pods. --- charts/airbyte-pod-sweeper/templates/configmap.yaml | 5 +++-- kube/resources/pod-sweeper.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/airbyte-pod-sweeper/templates/configmap.yaml b/charts/airbyte-pod-sweeper/templates/configmap.yaml index 627fe89b51977..084c12024ce5d 100644 --- a/charts/airbyte-pod-sweeper/templates/configmap.yaml +++ b/charts/airbyte-pod-sweeper/templates/configmap.yaml @@ -1,4 +1,5 @@ --- + apiVersion: v1 kind: ConfigMap metadata: @@ -10,7 +11,7 @@ data: sweep-pod.sh: | #!/bin/bash get_worker_pods () { - kubectl -n ${KUBE_NAMESPACE} -L airbyte -l airbyte=worker-pod \ + kubectl -n ${KUBE_NAMESPACE} -L airbyte -l airbyte=job-pod \ --field-selector status.phase!=Running get pods \ -o=jsonpath='{range .items[*]} {.metadata.name} {.status.phase} {.status.conditions[0].lastTransitionTime} {.status.startTime}{"\n"}{end}' } @@ -47,4 +48,4 @@ data: done ) sleep 60 - done \ No newline at end of file + done diff --git a/kube/resources/pod-sweeper.yaml b/kube/resources/pod-sweeper.yaml index b2a35b3bc4619..3f20cc23a7a7c 100644 --- a/kube/resources/pod-sweeper.yaml +++ b/kube/resources/pod-sweeper.yaml @@ -7,7 +7,7 @@ data: #!/bin/bash get_worker_pods () { - kubectl -n ${KUBE_NAMESPACE} -L airbyte -l airbyte=worker-pod \ + kubectl -n ${KUBE_NAMESPACE} -L airbyte -l airbyte=job-pod \ --field-selector status.phase!=Running get pods \ -o=jsonpath='{range .items[*]} {.metadata.name} {.status.phase} {.status.conditions[0].lastTransitionTime} {.status.startTime}{"\n"}{end}' }