Skip to content

Commit a2f25aa

Browse files
committed
update shared volume from values.yaml
1 parent f2f23d7 commit a2f25aa

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ spec:
2121
{{- end }}
2222
securityContext:
2323
{{- toYaml .Values.podSecurityContext | nindent 4 }}
24+
{{- if .Values.enableInitContainers }}
2425
initContainers:
2526
- name: prepare-files
2627
image: busybox
@@ -37,11 +38,11 @@ spec:
3738
# Ensure the file has the correct permissions
3839
chmod 644 /shared-data/admin.macaroon
3940
volumeMounts:
40-
- name: shared-data
41-
mountPath: /shared-data
41+
- name: {{ .Values.sharedVolume.name }}
42+
mountPath: {{ .Values.sharedVolume.mountPath }}
4243
- name: config
4344
mountPath: /config
44-
45+
{{- end }}
4546
containers:
4647
- name: {{ .Chart.Name }}
4748
securityContext:
@@ -67,8 +68,8 @@ spec:
6768
resources:
6869
{{- toYaml .Values.resources | nindent 8 }}
6970
volumeMounts:
70-
- mountPath: /shared-data
71-
name: shared-data
71+
- mountPath: {{ .Values.sharedVolume.mountPath }}
72+
name: {{ .Values.sharedVolume.name }}
7273
{{- with .Values.volumeMounts }}
7374
{{- toYaml . | nindent 8 }}
7475
{{- end }}
@@ -88,7 +89,7 @@ spec:
8889
{{- toYaml . | nindent 4 }}
8990
{{- end }}
9091
volumes:
91-
- name: shared-data
92+
- name: {{ .Values.sharedVolume.name }}
9293
emptyDir: {}
9394
{{- with .Values.volumes }}
9495
{{- toYaml . | nindent 4 }}

resources/charts/bitcoincore/charts/lnd/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,12 @@ config: ""
132132
defaultConfig: ""
133133

134134
channels: []
135+
136+
# Controls whether the initContainers should be included
137+
enableInitContainers: true
138+
139+
# Shared volume configuration for storing shared data (e.g., macaroons or other files)
140+
# This volume is mounted at the specified mountPath and can be used for inter-container communication.
141+
sharedVolume:
142+
name: shared-data
143+
mountPath: /shared-data

resources/networks/hello/network.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ nodes:
4848
- name: config
4949
mountPath: /tls.cert
5050
subPath: tls.cert
51-
51+
5252
- name: tank-0004
5353
addnode:
5454
- tank-0000

0 commit comments

Comments
 (0)