Add initcontainer to bypass 1.9.4 read-only configmap mount (#4411)

This commit is contained in:
Raymond Botha
2018-03-27 13:21:03 -07:00
committed by k8s-ci-robot
parent d13c73ce32
commit d2272b8cbf
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -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:
+13
View File
@@ -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 }}