mirror of
https://github.com/truenas/charts.git
synced 2026-04-13 17:52:13 +08:00
Small performance improvement. No need to chown the entire directory
after the first init.
This commit is contained in:
@@ -26,7 +26,7 @@ spec:
|
||||
initContainers:
|
||||
- name: init-init
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
command: ['/bin/sh', '-c', '[ ! -e /data/ipfs/config ] && /usr/local/bin/ipfs init ; exit 0']
|
||||
command: ['/bin/sh', '-c', '[ ! -e /data/ipfs/config ] && (/usr/local/bin/ipfs init ; chown -R 1000:100 /data/ipfs) ; exit 0']
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
@@ -80,7 +80,7 @@ spec:
|
||||
mountPath: /export
|
||||
- name: init-chown
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
command: ['chown', '-R', '1000:100', '/data/ipfs']
|
||||
command: ['chown', '1000:100', '/data/ipfs/config']
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
|
||||
Reference in New Issue
Block a user