From d2272b8cbfce369a5bb9a06101571fa93df4f7ed Mon Sep 17 00:00:00 2001 From: Raymond Botha Date: Tue, 27 Mar 2018 22:21:03 +0200 Subject: [PATCH] Add initcontainer to bypass 1.9.4 read-only configmap mount (#4411) --- stable/bitcoind/Chart.yaml | 2 +- stable/bitcoind/templates/deployment.yaml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/stable/bitcoind/Chart.yaml b/stable/bitcoind/Chart.yaml index afbf59890c..eb2ef93496 100644 --- a/stable/bitcoind/Chart.yaml +++ b/stable/bitcoind/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: bitcoind -version: 0.1.0 +version: 0.1.1 appVersion: "0.15.1" description: Bitcoin is an innovative payment network and a new kind of money. keywords: diff --git a/stable/bitcoind/templates/deployment.yaml b/stable/bitcoind/templates/deployment.yaml index 3e4206a8e2..273e0c274d 100644 --- a/stable/bitcoind/templates/deployment.yaml +++ b/stable/bitcoind/templates/deployment.yaml @@ -18,6 +18,17 @@ spec: app: {{ template "bitcoind.name" . }} release: {{ .Release.Name }} spec: + {{- if .Values.configurationFile }} + initContainers: + - name: copy-bitcoind-config + image: busybox + command: ['sh', '-c', 'cp /configmap/bitcoin.conf /bitcoin/.bitcoin/bitcoin.conf'] + volumeMounts: + - name: configmap + mountPath: /configmap + - name: config + mountPath: /bitcoin/.bitcoin/ + {{- end }} containers: - name: {{ template "bitcoind.fullname" . }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -44,6 +55,8 @@ spec: volumes: {{- if .Values.configurationFile }} - name: config + emptyDir: {} + - name: configmap configMap: name: {{ template "bitcoind.fullname" . }} {{- end }}