Skip to content

Commit fdbaf71

Browse files
committed
make cln rune creation more robust with startupProbe
1 parent f232768 commit fdbaf71

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

resources/charts/bitcoincore/charts/cln/templates/pod.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,7 @@ spec:
4141
- /bin/sh
4242
- -c
4343
- |
44-
lightningd --conf=/root/.lightning/config &
45-
sleep 1
46-
lightning-cli createrune > /working/rune.json
47-
echo "Here is the rune file contents"
48-
cat /working/rune.json
49-
wait
44+
lightningd --conf=/root/.lightning/config
5045
livenessProbe:
5146
{{- toYaml .Values.livenessProbe | nindent 8 }}
5247
readinessProbe:

resources/charts/bitcoincore/charts/cln/values.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ livenessProbe:
5757
- "-c"
5858
- "lightning-cli getinfo >/dev/null 2>&1"
5959
failureThreshold: 3
60-
initialDelaySeconds: 5
60+
initialDelaySeconds: 10
6161
periodSeconds: 5
6262
successThreshold: 1
63-
timeoutSeconds: 1
63+
timeoutSeconds: 5
6464
readinessProbe:
6565
failureThreshold: 10
6666
periodSeconds: 30
@@ -71,6 +71,20 @@ readinessProbe:
7171
- "/bin/sh"
7272
- "-c"
7373
- "lightning-cli getinfo 2>/dev/null | grep -q 'id' || exit 1"
74+
startupProbe:
75+
failureThreshold: 10
76+
periodSeconds: 30
77+
successThreshold: 1
78+
timeoutSeconds: 60
79+
exec:
80+
command:
81+
- /bin/sh
82+
- -c
83+
- |
84+
while [ ! -s /working/rune.json ]; do
85+
lightning-cli createrune > /working/rune.json 2>/dev/null
86+
sleep 2
87+
done
7488
7589
# Additional volumes on the output Deployment definition.
7690
volumes:

resources/charts/bitcoincore/charts/eclair/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ livenessProbe:
6060
- 21satoshi
6161
- getinfo
6262
failureThreshold: 3
63-
initialDelaySeconds: 5
63+
initialDelaySeconds: 10
6464
periodSeconds: 5
6565
successThreshold: 1
66-
timeoutSeconds: 1
66+
timeoutSeconds: 5
6767
readinessProbe:
6868
failureThreshold: 3
6969
periodSeconds: 5

0 commit comments

Comments
 (0)