Skip to content

Commit

Permalink
Use the right label. (#21829)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davinchia authored Jan 25, 2023
1 parent e39ee94 commit 053ea74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions charts/airbyte-pod-sweeper/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---

apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -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}'
}
Expand Down Expand Up @@ -47,4 +48,4 @@ data:
done
)
sleep 60
done
done
2 changes: 1 addition & 1 deletion kube/resources/pod-sweeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
}
Expand Down

0 comments on commit 053ea74

Please sign in to comment.