@@ -171,6 +171,7 @@ kind: StatefulSet
171171metadata :
172172 name : worker
173173spec :
174+ podManagementPolicy : Parallel
174175 replicas : {{ .Values.deployment.worker.replicas }}
175176 selector :
176177 matchLabels :
@@ -185,77 +186,77 @@ spec:
185186 app : worker
186187 spec :
187188 containers :
188- - name : worker-pod
189- {{ if .Values.deployment.fqn_images }}
190- image : {{ .Values.deployment.fqn_images.worker }}
191- {{ else if .Values.deployment.tag }}
192- image : {{ .Values.deployment.registry }}/worker:{{ .Values.deployment.tag }}
193- {{ else }}
194- image : {{ .Values.deployment.registry }}/worker:{{ .Release.Namespace }}-latest
195- {{ end }}
196- imagePullPolicy : {{ .Values.deployment.imagePullPolicy | default "IfNotPresent" }}
197- resources :
198- {{ with .Values.deployment.worker.resources }}
199- {{ toYaml . | nindent 10 }}
200- {{ end }}
201- env :
202- - name : K8S_POD_NAME
203- valueFrom :
204- fieldRef :
205- fieldPath : metadata.name
206- - name : K8S_NODE_NAME
207- valueFrom :
208- fieldRef :
209- fieldPath : spec.nodeName
210- - name : K8S_NAMESPACE
211- valueFrom :
212- fieldRef :
213- fieldPath : metadata.namespace
214- - name : POLYTOPE_PROXY
215- value : {{ .Values.deployment.polytope_proxy }}
216- - name : MIR_CACHE_PATH
217- value : /home/polytope/data/mir_cache
218- - name : MARS_READANY_BUFFER_SIZE
219- value : " 1073741824"
220- - name : MIR_GRIB_INPUT_BUFFER_SIZE
221- value : " 1073741824"
222- - name : METKIT_RAW_PARAM
223- value : " 1"
224- - name : SCHEDULE_ENABLED
225- value : {{ .Values.deployment.worker.schedule.enabled | quote }}
226- - name : MARS_DEBUG
227- value : {{ .Values.logging.mars_debug | quote | default "0" }}
228- - name : FDB_DEBUG
229- value : {{ .Values.logging.fdb_debug | quote | default "0" }}
230- volumeMounts :
231- - name : config-volume
232- mountPath : /etc/polytope
233- - name : ppdir
234- mountPath : /var/tmp/ppdir
235- - name : statistics
236- mountPath : /logs/mars/statistics
237- - name : tmp
238- mountPath : /tmp
239- # - name: fdb
240- # mountPath: /data
241- - name : worker-persistent
242- mountPath : /persistent
243- {{ if .Values.deployment.mars_c.enabled }}
244- - name : mars-ssh-key
245- mountPath : /home/polytope/.ssh/id_rsa.pub
246- subPath : " id_rsa.pub"
247- readOnly : true
248- - name : mars-ssh-key
249- mountPath : /home/polytope/.ssh/id_rsa
250- subPath : " id_rsa"
251- readOnly : true
252- {{ end }}
253- {{ if .Values.deployment.worker.schedule.enabled }}
254- - name : schedule-config
255- mountPath : /etc/polytope_schedule
189+ - name : worker-pod
190+ {{ if .Values.deployment.fqn_images }}
191+ image : {{ .Values.deployment.fqn_images.worker }}
192+ {{ else if .Values.deployment.tag }}
193+ image : {{ .Values.deployment.registry }}/worker:{{ .Values.deployment.tag }}
194+ {{ else }}
195+ image : {{ .Values.deployment.registry }}/worker:{{ .Release.Namespace }}-latest
256196 {{ end }}
257- command : ["sh", "-c"]
258- args : ["while python -m polytope_server.worker; do if [ $? -ne 0 ]; then exit $?; fi; echo 'Worker finished with exit code' $?; sleep 1; done"]
197+ imagePullPolicy : {{ .Values.deployment.imagePullPolicy | default "IfNotPresent" }}
198+ resources :
199+ {{ with .Values.deployment.worker.resources }}
200+ {{ toYaml . | nindent 12 }}
201+ {{ end }}
202+ env :
203+ - name : K8S_POD_NAME
204+ valueFrom :
205+ fieldRef :
206+ fieldPath : metadata.name
207+ - name : K8S_NODE_NAME
208+ valueFrom :
209+ fieldRef :
210+ fieldPath : spec.nodeName
211+ - name : K8S_NAMESPACE
212+ valueFrom :
213+ fieldRef :
214+ fieldPath : metadata.namespace
215+ - name : POLYTOPE_PROXY
216+ value : {{ .Values.deployment.polytope_proxy }}
217+ - name : MIR_CACHE_PATH
218+ value : /home/polytope/data/mir_cache
219+ - name : MARS_READANY_BUFFER_SIZE
220+ value : " 1073741824"
221+ - name : MIR_GRIB_INPUT_BUFFER_SIZE
222+ value : " 1073741824"
223+ - name : METKIT_RAW_PARAM
224+ value : " 1"
225+ - name : SCHEDULE_ENABLED
226+ value : {{ .Values.deployment.worker.schedule.enabled | quote }}
227+ - name : MARS_DEBUG
228+ value : {{ .Values.logging.mars_debug | quote | default "0" }}
229+ - name : FDB_DEBUG
230+ value : {{ .Values.logging.fdb_debug | quote | default "0" }}
231+ volumeMounts :
232+ - name : config-volume
233+ mountPath : /etc/polytope
234+ - name : ppdir
235+ mountPath : /var/tmp/ppdir
236+ - name : statistics
237+ mountPath : /logs/mars/statistics
238+ - name : tmp
239+ mountPath : /tmp
240+ # - name: fdb
241+ # mountPath: /data
242+ - name : worker-persistent
243+ mountPath : /persistent
244+ {{ if .Values.deployment.mars_c.enabled }}
245+ - name : mars-ssh-key
246+ mountPath : /home/polytope/.ssh/id_rsa.pub
247+ subPath : " id_rsa.pub"
248+ readOnly : true
249+ - name : mars-ssh-key
250+ mountPath : /home/polytope/.ssh/id_rsa
251+ subPath : " id_rsa"
252+ readOnly : true
253+ {{ end }}
254+ {{ if .Values.deployment.worker.schedule.enabled }}
255+ - name : schedule-config
256+ mountPath : /etc/polytope_schedule
257+ {{ end }}
258+ command : ["sh", "-c"]
259+ args : ["while python -m polytope_server.worker; do if [ $? -ne 0 ]; then exit $?; fi; echo 'Worker finished with exit code' $?; sleep 1; done"]
259260 volumes :
260261 - name : config-volume
261262 configMap :
@@ -296,6 +297,9 @@ spec:
296297 values :
297298 - {{ .Values.deployment.worker_node }}
298299 {{ end }}
300+ updateStrategy :
301+ rollingUpdate :
302+ maxUnavailable : 1
299303
300304 volumeClaimTemplates :
301305 - metadata :
0 commit comments