@@ -16,17 +16,6 @@ cat << EOF
1616 force the delete of the lease, or view the current lease.
1717 It exits with a non-zero value on a failure.
1818
19- Warnings:
20-
21- This is a 'best effort' script -- it still has potential race
22- conditions. They should be pretty rare, but don't bet the farm on
23- them not happening!
24-
25- This script requires cooperation among all users of the k8s cluster that
26- need exclusive access - they all must use the script. The script
27- doesn't directly grant exclusive access, it just can be used to make sure
28- that no other callers of the same script have the lease.
29-
3019 Usage:
3120
3221 Obtain : lease.sh -o id [-t timeout]
@@ -45,8 +34,8 @@ cat << EOF
4534 while trying to get the lease (tunable via -t), and will grab
4635 the lease if no other process owns it or no other process has touched
4736 it for a period of 10 minutes. 'id' should be some unique
48- string suitable for use as a filename - a pid is sufficient
49- or a ` uuidgen ` value .
37+ string suitable for use as a filename - a uuid is preferred but a
38+ pid is usually sufficient .
5039
5140 2) While running, call 'lease.sh -r id' every few minutes
5241 to renew the lease and retain ownership. Fail if this fails,
@@ -68,6 +57,18 @@ cat << EOF
6857 'lease.sh -f' or 'kubectl delete cm acceptance-test-lease -n default'.
6958 This should only be done if you're sure there's
7059 no current processe that owns the lease.
60+
61+ Warnings:
62+
63+ This is a 'best effort' script -- it still has potential race
64+ conditions. They should be pretty rare, but don't bet the farm on
65+ them not happening!
66+
67+ This script requires cooperation among all users of the k8s cluster that
68+ need exclusive access - they all must use the script. The script
69+ doesn't directly grant exclusive access, it just can be used to make sure
70+ that no other callers of the same script have the lease.
71+
7172
7273 Internals:
7374
0 commit comments