Skip to content

Commit 02609bc

Browse files
committed
fixes for eclair
1 parent 80c3211 commit 02609bc

File tree

7 files changed

+98
-27
lines changed

7 files changed

+98
-27
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "eclair.fullname" . }}
5+
labels:
6+
{{- include "eclair.labels" . | nindent 4 }}
7+
data:
8+
config: |
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.rpcpassword={{ .Values.global.rpcpassword }}
16+
eclair.node-alias={{ include "eclair.fullname" . }}
17+
eclair.bitcoind.zmqblock=tcp://{{ include "bitcoincore.fullname" . }}:{{ .Values.global.ZMQBlockPort }}
18+
eclair.bitcoind.zmqtx=tcp://{{ include "bitcoincore.fullname" . }}:{{ .Values.global.ZMQTxPort }}
19+
---
20+
apiVersion: v1
21+
kind: ConfigMap
22+
metadata:
23+
name: {{ include "eclair.fullname" . }}-channels
24+
labels:
25+
channels: "true"
26+
{{- include "eclair.labels" . | nindent 4 }}
27+
data:
28+
source: {{ include "eclair.fullname" . }}
29+
channels: |
30+
{{ .Values.channels | toJson }}

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: apps/v1
1+
apiVersion: v1
22
kind: Pod
33
metadata:
44
name: {{ include "eclair.fullname" . }}
@@ -12,6 +12,8 @@ metadata:
1212
collect_logs: "true"
1313
{{- end }}
1414
chain: {{ .Values.global.chain }}
15+
annotations:
16+
kubectl.kubernetes.io/default-container: "eclair"
1517
spec:
1618
{{- with .Values.imagePullSecrets }}
1719
imagePullSecrets:
@@ -26,24 +28,32 @@ spec:
2628
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
2729
imagePullPolicy: {{ .Values.image.pullPolicy }}
2830
ports:
29-
- name: http
30-
containerPort: {{ .Values.service.port }}
31+
- name: server
32+
containerPort: {{ .Values.ServerPort }}
33+
protocol: TCP
34+
- name: rest
35+
containerPort: {{ .Values.RestPort }}
3136
protocol: TCP
3237
livenessProbe:
3338
{{- toYaml .Values.livenessProbe | nindent 12 }}
3439
readinessProbe:
3540
{{- toYaml .Values.readinessProbe | nindent 12 }}
3641
resources:
3742
{{- toYaml .Values.resources | nindent 12 }}
38-
39-
{{- with .Values.volumeMounts }}
4043
volumeMounts:
41-
{{- toYaml . | nindent 12 }}
42-
{{- end }}
43-
{{- with .Values.volumes }}
44+
{{- with .Values.volumeMounts }}
45+
{{- toYaml . | nindent 12 }}
46+
{{- end }}
47+
- mountPath: /home/eclair/.eclair/eclair.conf
48+
name: config
49+
subPath: eclair.confg
4450
volumes:
45-
{{- toYaml . | nindent 8 }}
46-
{{- end }}
51+
{{- with .Values.volumes }}
52+
{{- toYaml . | nindent 8 }}
53+
{{- end }}
54+
- configMap:
55+
name: {{ include "eclair.fullname" . }}
56+
name: config
4757
{{- with .Values.nodeSelector }}
4858
nodeSelector:
4959
{{- toYaml . | nindent 8 }}

resources/charts/bitcoincore/charts/eclair/templates/service.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ spec:
1212
targetPort: server
1313
protocol: TCP
1414
name: server
15-
- port: {{ .Values.APIPort }}
16-
targetPort: api
15+
- port: {{ .Values.RestPort }}
16+
targetPort: rest
1717
protocol: TCP
18-
name: api
18+
name: rest
1919
selector:
2020
{{- include "eclair.selectorLabels" . | nindent 4 }}

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

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ image:
99
# This sets the pull policy for images.
1010
pullPolicy: IfNotPresent
1111
# Overrides the image tag whose default is the chart appVersion.
12-
tag: "release-0.8.0"
12+
tag: "latest"
1313

1414
# This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
1515
imagePullSecrets: []
@@ -33,13 +33,11 @@ securityContext: {}
3333
# runAsNonRoot: true
3434
# runAsUser: 1000
3535

36-
# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
3736
service:
38-
# This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
3937
type: ClusterIP
40-
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
38+
4139
ServerPort: 9735
42-
APIPort: 8080
40+
RestPort: 8080
4341

4442
# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
4543
ingress:
@@ -116,17 +114,13 @@ tolerations: []
116114
affinity: {}
117115

118116
baseConfig: |
119-
# server port
120-
eclair.server.port=9737
121-
# node's label
122-
eclair.node-alias="eclair-node"
123-
# rgb node's color
124-
eclair.node-color=49daaa
117+
eclair.server.port=9735
125118
eclair.api.enabled=true
126-
# Make sure this port isn't accessible from the internet!
119+
eclair.api.password=foo
127120
eclair.api.port=8080
128-
#eclair.api.password is set in configmap.yaml
129-
121+
eclair.bitcoind.rpcuser=user
122+
# zmq* and eclair.bitcoind.rpcpassword are set in configmap.yaml
123+
130124
config: ""
131125

132126
defaultConfig: ""

resources/charts/bitcoincore/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,4 @@ loadSnapshot:
143143
ln:
144144
lnd: false
145145
eclair: false
146+
cln: false

test/data/eclair/network.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
nodes:
2+
- name: tank-0000
3+
addnode:
4+
- tank-0001
5+
- name: tank-0001
6+
addnode:
7+
- tank-0002
8+
- name: tank-0002
9+
addnode:
10+
- tank-0000
11+
- name: tank-0003
12+
addnode:
13+
- tank-0000
14+
- name: tank-0004
15+
addnode:
16+
- tank-0000
17+
- name: tank-0005
18+
addnode:
19+
- tank-0000

test/data/eclair/node-defaults.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# enable collectLogs and metricsExport to activate publish lnd-exporter metrics
2+
3+
#Core configs
4+
image:
5+
repository: bitcoindevproject/bitcoin
6+
pullPolicy: IfNotPresent
7+
tag: "27.0"
8+
collectLogs: false
9+
metricsExport: false
10+
11+
#LN configs
12+
ln:
13+
eclair: true
14+
eclair:
15+
defaultConfig: |
16+
eclair.node-color=49daaa
17+
metricsExport: false

0 commit comments

Comments
 (0)