Skip to content

Commit

Permalink
Merge pull request #9 from santiment/configuration-file-name-can-be-set
Browse files Browse the repository at this point in the history
Configuration file name can be set
  • Loading branch information
kalkov authored Feb 8, 2023
2 parents 040221b + 5a6cc4c commit 4c72a36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/bitcoind/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ sources:
- https://github.com/kubernetes/charts
- https://github.com/kuberstack/bitcoind
- https://github.com/kylemanna/docker-bitcoind
version: 0.1.4
version: 0.2
10 changes: 5 additions & 5 deletions charts/bitcoind/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ spec:
initContainers:
- name: copy-bitcoind-config
image: busybox
command: ['sh', '-c', "cp /configmap/bitcoin.conf {{ .Values.path }}/.bitcoin/bitcoin.conf"]
command: ['sh', '-c', "cp /configmap/{{ .Values.configurationFilename}} {{ .Values.path }}/{{ .Values.subPath}}/{{ .Values.configurationFilename}}"]
volumeMounts:
- name: configmap
mountPath: /configmap
- name: config
mountPath: "{{ .Values.path }}/.bitcoin/"
mountPath: "{{ .Values.path }}/{{ .Values.subPath }}/"
{{- end }}
containers:
- name: {{ template "bitcoind.fullname" . }}
Expand All @@ -52,11 +52,11 @@ spec:
containerPort: {{ .Values.service.testnetP2pPort }}
volumeMounts:
- name: data
mountPath: {{ .Values.dataPath }}
mountPath: {{ .Values.path }}
{{- if .Values.configurationFile }}
- name: config
mountPath: "{{ .Values.path }}/.bitcoin/bitcoin.conf"
subPath: bitcoin.conf
mountPath: "{{ .Values.path }}/{{ .Values.subPath }}/{{ .Values.configurationFilename }}"
subPath: {{ .Values.configurationFilename }}
{{- end }}
volumes:
{{- if .Values.configurationFile }}
Expand Down
3 changes: 2 additions & 1 deletion charts/bitcoind/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ resources: {}
# value: SOME_VALUE

path: /home/bitcoin
dataPath: /data
subPath: .bitcoin
configurationFilename: bitcoin.conf

# Custom bitcoind configuration file used to override default bitcoind settings
configurationFile:
Expand Down

0 comments on commit 4c72a36

Please sign in to comment.