Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use kube service user for pod sweeper #4737

Merged
merged 10 commits into from
Jul 14, 2021
3 changes: 2 additions & 1 deletion kube/resources/pod-sweeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data:
while :
do
# Shorter time window for completed pods
SUCCESS_DATE_STR=`date -d 'now - 30 seconds' --utc -Ins`
SUCCESS_DATE_STR=`date -d 'now - 2 hours' --utc -Ins`
SUCCESS_DATE=`date -d $SUCCESS_DATE_STR +%s`
# Longer time window for pods in error (to debug)
NON_SUCCESS_DATE_STR=`date -d 'now - 24 hours' --utc -Ins`
Expand Down Expand Up @@ -59,6 +59,7 @@ spec:
labels:
airbyte: pod-sweeper
spec:
serviceAccountName: airbyte-admin
containers:
- name: airbyte-pod-sweeper
image: bitnami/kubectl
Expand Down
3 changes: 2 additions & 1 deletion tools/bin/acceptance_test_kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ sleep 120s

server_logs () { echo "server logs:" && kubectl logs deployment.apps/airbyte-server; }
scheduler_logs () { echo "scheduler logs:" && kubectl logs deployment.apps/airbyte-scheduler; }
pod_sweeper_logs () { echo "pod sweeper logs:" && kubectl logs deployment.apps/airbyte-pod-sweeper; }
describe_pods () { echo "describe pods:" && kubectl describe pods; }
print_all_logs () { server_logs; scheduler_logs; describe_pods; }
print_all_logs () { server_logs; scheduler_logs; pod_sweeper_logs; describe_pods; }

trap "echo 'kube logs:' && print_all_logs" EXIT

Expand Down