Skip to content

Commit 234137e

Browse files
committed
Add eclair support to simln plugin - upgrade to 0.2.4
override network graph check for eclair nodes pin eclair docker image to 0.11.0 version enable keysend feature for eclair handle new enabled scheme for ln nodes conditional enable wallets for eclair nodes update documentation to use new ln node enable scheme
1 parent eb39106 commit 234137e

File tree

21 files changed

+644
-74
lines changed

21 files changed

+644
-74
lines changed

docs/circuit-breaker.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ nodes:
2020
- name: tank-0003
2121
addnode:
2222
- tank-0000
23-
ln:
24-
lnd: true
2523
lnd:
24+
enabled: true
2625
config: |
2726
bitcoin.timelockdelta=33
2827
channels:
@@ -51,27 +50,26 @@ nodes:
5150
- name: tank-0000
5251
addnode:
5352
- tank-0001
54-
ln:
55-
lnd: true
53+
lnd:
54+
enabled: true
5655
5756
- name: tank-0001
5857
addnode:
5958
- tank-0002
60-
ln:
61-
lnd: true
59+
lnd:
60+
enabled: true
6261
6362
- name: tank-0002
6463
addnode:
6564
- tank-0000
66-
ln:
67-
lnd: true
65+
lnd:
66+
enabled: true
6867
6968
- name: tank-0003
7069
addnode:
7170
- tank-0000
72-
ln:
73-
lnd: true
7471
lnd:
72+
enabled: true
7573
config: |
7674
bitcoin.timelockdelta=33
7775
channels:
@@ -88,9 +86,8 @@ nodes:
8886
- name: tank-0004
8987
addnode:
9088
- tank-0000
91-
ln:
92-
lnd: true
9389
lnd:
90+
enabled: true
9491
channels:
9592
- id:
9693
block: 300
@@ -102,8 +99,8 @@ nodes:
10299
- name: tank-0005
103100
addnode:
104101
- tank-0000
105-
ln:
106-
lnd: true
102+
lnd:
103+
enabled: true
107104
```
108105

109106
## Accessing Circuit Breaker

resources/charts/bitcoincore/Chart.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ description: A Helm chart for Bitcoin Core
55
dependencies:
66
- name: lnd
77
version: 0.1.0
8-
condition: ln.lnd
8+
condition: lnd.enabled
99
- name: cln
1010
version: 0.1.0
11-
condition: ln.cln
11+
condition: cln.enabled
12+
- name: eclair
13+
version: 0.1.0
14+
condition: eclair.enabled
1215

1316
# A chart can be either an 'application' or a 'library' chart.
1417
#
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v2
2+
name: eclair
3+
description: A Helm chart for Eclair
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 0.1.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
# It is recommended to use it with quotes.
24+
appVersion: "0.1.0"
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{{/*
2+
Expand the name of the PARENT chart.
3+
*/}}
4+
{{- define "bitcoincore.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified PARENT app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "bitcoincore.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- printf "%s" .Release.Name | trunc 63 | trimSuffix "-" }}
18+
{{- end }}
19+
{{- end }}
20+
21+
22+
{{/*
23+
Expand the name of the chart.
24+
*/}}
25+
{{- define "eclair.name" -}}
26+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}-ln
27+
{{- end }}
28+
29+
{{/*
30+
Create a default fully qualified app name.
31+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
32+
If release name contains chart name it will be used as a full name.
33+
*/}}
34+
{{- define "eclair.fullname" -}}
35+
{{- if .Values.fullnameOverride }}
36+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
37+
{{- else }}
38+
{{- printf "%s" .Release.Name | trunc 63 | trimSuffix "-" }}-ln
39+
{{- end }}
40+
{{- end }}
41+
42+
{{/*
43+
Create chart name and version as used by the chart label.
44+
*/}}
45+
{{- define "eclair.chart" -}}
46+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
47+
{{- end }}
48+
49+
{{/*
50+
Common labels
51+
*/}}
52+
{{- define "eclair.labels" -}}
53+
helm.sh/chart: {{ include "eclair.chart" . }}
54+
{{ include "eclair.selectorLabels" . }}
55+
{{- if .Chart.AppVersion }}
56+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
57+
{{- end }}
58+
app.kubernetes.io/managed-by: {{ .Release.Service }}
59+
{{- end }}
60+
61+
{{/*
62+
Selector labels
63+
*/}}
64+
{{- define "eclair.selectorLabels" -}}
65+
app.kubernetes.io/name: {{ include "eclair.name" . }}
66+
app.kubernetes.io/instance: {{ .Release.Name }}
67+
{{- end }}
68+
69+
{{/*
70+
Create the name of the service account to use
71+
*/}}
72+
{{- define "eclair.serviceAccountName" -}}
73+
{{- if .Values.serviceAccount.create }}
74+
{{- default (include "eclair.fullname" .) .Values.serviceAccount.name }}
75+
{{- else }}
76+
{{- default "default" .Values.serviceAccount.name }}
77+
{{- end }}
78+
{{- end }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "eclair.fullname" . }}
5+
labels:
6+
{{- include "eclair.labels" . | nindent 4 }}
7+
data:
8+
eclair.conf: |
9+
{{- .Values.baseConfig | nindent 4 }}
10+
{{- .Values.defaultConfig | nindent 4 }}
11+
{{- .Values.config | nindent 4 }}
12+
eclair.chain = {{ .Values.global.chain }}
13+
eclair.bitcoind.host = {{ include "bitcoincore.fullname" . }}
14+
eclair.bitcoind.rpcport = {{ index .Values.global .Values.global.chain "RPCPort" }}
15+
eclair.bitcoind.rpcuser = user
16+
eclair.bitcoind.rpcpassword = {{ .Values.global.rpcpassword }}
17+
eclair.node-alias = {{ include "eclair.fullname" . }}
18+
eclair.bitcoind.zmqblock = "tcp://{{ include "bitcoincore.fullname" . }}:{{ .Values.global.ZMQBlockPort }}"
19+
eclair.bitcoind.zmqtx = "tcp://{{ include "bitcoincore.fullname" . }}:{{ .Values.global.ZMQTxPort }}"
20+
eclair.bitcoind.startup-locked-utxos-behavior = "unlock"
21+
---
22+
apiVersion: v1
23+
kind: ConfigMap
24+
metadata:
25+
name: {{ include "eclair.fullname" . }}-channels
26+
labels:
27+
channels: "true"
28+
{{- include "eclair.labels" . | nindent 4 }}
29+
data:
30+
source: {{ include "eclair.fullname" . }}
31+
channels: |
32+
{{ .Values.channels | toJson }}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: {{ include "eclair.fullname" . }}
5+
labels:
6+
{{- include "eclair.labels" . | nindent 4 }}
7+
{{- with .Values.podLabels }}
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}
10+
app: {{ include "eclair.fullname" . }}
11+
{{- if .Values.collectLogs }}
12+
collect_logs: "true"
13+
{{- end }}
14+
chain: {{ .Values.global.chain }}
15+
annotations:
16+
kubectl.kubernetes.io/default-container: "eclair"
17+
spec:
18+
{{- with .Values.imagePullSecrets }}
19+
restartPolicy: "{{ .Values.restartPolicy }}"
20+
imagePullSecrets:
21+
{{- toYaml . | nindent 4 }}
22+
{{- end }}
23+
securityContext:
24+
{{- toYaml .Values.podSecurityContext | nindent 4 }}
25+
containers:
26+
- name: {{ .Chart.Name }}
27+
securityContext:
28+
{{- toYaml .Values.securityContext | nindent 12 }}
29+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
30+
imagePullPolicy: {{ .Values.image.pullPolicy }}
31+
command:
32+
- "sh"
33+
- "-c"
34+
args:
35+
- >
36+
/app/eclair-node/bin/eclair-node.sh -v &
37+
while [ ! -f /root/.eclair/eclair.log ]; do
38+
echo "Waiting for log file"
39+
sleep 2
40+
done &&
41+
tail -f /root/.eclair/eclair.log
42+
ports:
43+
- name: server
44+
containerPort: {{ .Values.ServerPort }}
45+
protocol: TCP
46+
- name: rest
47+
containerPort: {{ .Values.RestPort }}
48+
protocol: TCP
49+
livenessProbe:
50+
{{- toYaml .Values.livenessProbe | nindent 8 }}
51+
readinessProbe:
52+
{{- toYaml .Values.readinessProbe | nindent 8 }}
53+
startupProbe:
54+
{{- toYaml .Values.startupProbe | nindent 8 }}
55+
resources:
56+
{{- toYaml .Values.resources | nindent 12 }}
57+
volumeMounts:
58+
{{- with .Values.volumeMounts }}
59+
{{- toYaml . | nindent 8 }}
60+
{{- end }}
61+
{{- with .Values.extraContainers }}
62+
{{- toYaml . | nindent 6 }}
63+
{{- end }}
64+
volumes:
65+
{{- with .Values.volumes }}
66+
{{- toYaml . | nindent 4 }}
67+
{{- end }}
68+
- configMap:
69+
name: {{ include "eclair.fullname" . }}
70+
name: config
71+
{{- with .Values.nodeSelector }}
72+
nodeSelector:
73+
{{- toYaml . | nindent 8 }}
74+
{{- end }}
75+
{{- with .Values.affinity }}
76+
affinity:
77+
{{- toYaml . | nindent 8 }}
78+
{{- end }}
79+
{{- with .Values.tolerations }}
80+
tolerations:
81+
{{- toYaml . | nindent 8 }}
82+
{{- end }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "eclair.fullname" . }}
5+
labels:
6+
{{- include "eclair.labels" . | nindent 4 }}
7+
app: {{ include "eclair.fullname" . }}
8+
spec:
9+
type: {{ .Values.service.type }}
10+
ports:
11+
- port: {{ .Values.ServerPort }}
12+
targetPort: server
13+
protocol: TCP
14+
name: server
15+
- port: {{ .Values.RestPort }}
16+
targetPort: rest
17+
protocol: TCP
18+
name: rest
19+
selector:
20+
{{- include "eclair.selectorLabels" . | nindent 4 }}

0 commit comments

Comments
 (0)