1919 {{- end }}
2020 labels :
2121 {{- include "idxworker.selectorLabels" . | nindent 8 }}
22+ namespace : {{ .Release.Namespace }}
2223 spec :
2324 {{- with .Values.imagePullSecrets }}
2425 imagePullSecrets :
4748 {{- toYaml .Values.podSecurityContext | nindent 8 }}
4849 containers :
4950 - name : {{ .Chart.Name }}
51+ {{- if .Values.idxworker.enableMountWarmupHook }}
52+ lifecycle :
53+ postStart :
54+ exec :
55+ command :
56+ - sh
57+ - -c
58+ - |
59+ {
60+ ## This is a workaround for the Lustre file system
61+ echo "$(date '+%Y-%m-%d %H:%M:%S.%3N') - Warming up mounted directories..." >> /tmp/postStart.log
62+ ls -1 {{ .Values.idxworker.storage.hashStoreRootDir }}/metadata/tmp > /dev/null 2>&1 || true
63+ ls -1 {{ .Values.idxworker.storage.hashStoreRootDir }}/refs/tmp > /dev/null 2>&1 || true
64+ ls -1 {{ .Values.idxworker.storage.hashStoreRootDir }}/objects > /dev/null 2>&1 || true
65+ ls -1 {{ .Values.idxworker.storage.hashStoreRootDir }}/refs/pids > /dev/null 2>&1 || true
66+ ls -1 {{ .Values.idxworker.storage.hashStoreRootDir }}/refs/cids > /dev/null 2>&1 || true
67+ echo "$(date '+%Y-%m-%d %H:%M:%S.%3N') - Warm-up complete." >> /tmp/postStart.log
68+ }
69+ {{- end }}
70+ {{- if .Values.securityContext }}
5071 securityContext :
5172 {{- toYaml .Values.securityContext | nindent 12 }}
73+ {{- end }}
5274 image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
5375 imagePullPolicy : {{ .Values.image.pullPolicy }}
5476 {{- if .Values.idxworker.readinessProbe.enabled }}
@@ -74,12 +96,12 @@ spec:
7496 resources :
7597 {{- toYaml .Values.resources | nindent 12 }}
7698 volumeMounts :
77- - mountPath : /etc/dataone/dataone-indexer.properties
78- subPath : dataone-indexer.properties
79- name : {{ .Release.Name }}-config-volume
80- - mountPath : /etc/dataone/log4j2.properties
81- subPath : log4j2.properties
99+ {{- if .Values.extraVolumeMounts }}
100+ {{- tpl (toYaml .Values.extraVolumeMounts) . | nindent 12 }}
101+ {{- end }}
102+ - mountPath : /etc/dataone
82103 name : {{ .Release.Name }}-config-volume
104+ readOnly : true
83105 - mountPath : {{ .Values.persistence.mountPath }}
84106 name : indexer-metacat-pv
85107 {{- if .Values.persistence.subPath }}
@@ -91,6 +113,10 @@ spec:
91113 env :
92114 - name : DEBUG
93115 value : " {{ .Values.idxworker.debug }}"
116+ {{- if .Values.idxworker.javaMem }}
117+ - name : IDX_JAVA_MEM
118+ value : {{ .Values.idxworker.javaMem | quote }}
119+ {{- end }}
94120 - name : DATAONE_AUTH_TOKEN
95121 valueFrom :
96122 secretKeyRef :
@@ -116,6 +142,10 @@ spec:
116142 initContainers :
117143 - name : dependencies
118144 image : busybox:latest
145+ {{- if .Values.securityContext }}
146+ securityContext :
147+ {{- toYaml .Values.securityContext | nindent 12 }}
148+ {{- end }}
119149 command :
120150 - sh
121151 - -c
@@ -144,6 +174,9 @@ spec:
144174 echo waiting for Solr Schema to be accessible at http://{{ $solrHost }} :
145175 {{- $solrPort }}$SOLRURI; sleep 1; done;
146176 volumes :
177+ {{- if .Values.extraVolumes }}
178+ {{- tpl (toYaml .Values.extraVolumes) . | nindent 8 }}
179+ {{- end }}
147180 - name : {{ .Release.Name }}-config-volume
148181 configMap :
149182 name : {{ .Release.Name }}-indexer-configfiles
@@ -159,6 +192,9 @@ spec:
159192 readOnly : true
160193 {{- end }}
161194 - name : {{ .Release.Name }}-temp-tripledb-volume
195+ {{- if .Values.idxworker.tripleDbStorageDefinition }}
196+ {{- tpl (toYaml .Values.idxworker.tripleDbStorageDefinition) . | nindent 10 }}
197+ {{- else }}
162198 ephemeral :
163199 volumeClaimTemplate :
164200 spec :
@@ -169,3 +205,4 @@ spec:
169205 resources :
170206 requests :
171207 storage : 1Gi
208+ {{- end }}
0 commit comments