Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

Commit ced3f74

Browse files
authored
Merge pull request #61 from 18F/delete-local-data-on-drain
Delete local data on drain if pods have volumes
2 parents ff8c3d6 + e9c0c99 commit ced3f74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jobs/kubernetes-minion/templates/drain.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if /bin/nc -vz $API_HOST 8080; then
2626
QUERY="{range .items[?(.metadata.labels.kubernetes\.io/hostname==\"${NODE_HOST}\")]} {.metadata.name} {end}"
2727
NODE=$(kubectl -s http://${API_HOST}:8080 get nodes -o jsonpath="${QUERY}")
2828

29-
for i in {1..5}; do kubectl -s http://${API_HOST}:8080 drain ${NODE} --force --ignore-daemonsets && break || sleep 5; done
29+
for i in {1..5}; do kubectl -s http://${API_HOST}:8080 drain ${NODE} --force --ignore-daemonsets --delete-local-data && break || sleep 5; done
3030
fi
3131

3232
echo 0 >&3

0 commit comments

Comments
 (0)