Skip to content

Commit

Permalink
feat: be a bit more verbose with what is happening
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenweber committed Jan 7, 2021
1 parent 3f351a1 commit 4bb56fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ for j in $(kubectl get jobs --all-namespaces -o json | jq -r ".items[] | select(
[[ "$begin" < "$exp_date" ]] && echo "Unfinished job $ns/$job expired (at $exp_date) due to default failed TTL($DEFAULT_TTL_FAILED), deleting" && delete=1
fi
fi
elif [ $delete -eq 1 ]; then
kubectl delete job -n "$ns" "$job"
else
echo "job $ns/$job not ttl annotation set and no DEFAULT_TTL set, ignoring"
fi
[ $delete -eq 1 ] && kubectl delete job -n "$ns" "$job"
fi
done

Expand Down

0 comments on commit 4bb56fd

Please sign in to comment.