chart/hyrax/templates/deployment-worker.yaml in hyrax-3.0.1 vs chart/hyrax/templates/deployment-worker.yaml in hyrax-3.0.2

- old
+ new

@@ -1,5 +1,6 @@ +{{- if .Values.worker.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "hyrax.fullname" . }}-worker labels: @@ -17,45 +18,70 @@ {{- end }} labels: {{- include "hyrax.selectorLabels" . | nindent 8 }} spec: initContainers: + {{- if .Values.worker.extraInitContainers }} + {{- toYaml .Values.worker.extraInitContainers | nindent 8 }} + {{- end }} - name: db-wait image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.worker.image.pullPolicy }} envFrom: - configMapRef: name: {{ include "hyrax.fullname" . }}-env - secretRef: name: {{ template "hyrax.fullname" . }} + env: + {{- toYaml .Values.worker.extraEnvVars | nindent 12 }} command: - sh - -c - - db-wait.sh "$DB_HOST:$DB_PORT" - - db-wait.sh "$FCREPO_HOST:$FCREPO_PORT" - - db-wait.sh "$SOLR_HOST:$SOLR_PORT" + - db-wait.sh "$REDIS_HOST:6379" + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} serviceAccountName: {{ include "hyrax.serviceAccountName" . }} securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- toYaml .Values.worker.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }}-worker + securityContext: + {{- toYaml .Values.worker.securityContext | nindent 12 }} image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.worker.image.pullPolicy }} envFrom: - configMapRef: name: {{ include "hyrax.fullname" . }}-env - secretRef: name: {{ template "hyrax.fullname" . }} + {{- if .Values.solrExistingSecret }} + - secretRef: + name: {{ .Values.solrExistingSecret }} + {{- end }} + {{- with .Values.worker.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} + env: + {{- toYaml .Values.worker.extraEnvVars | nindent 12 }} volumeMounts: - name: derivatives mountPath: /app/samvera/derivatives - name: uploads subPath: file_cache mountPath: /app/samvera/file_cache - name: uploads subPath: uploads mountPath: /app/samvera/uploads + {{- if .Values.applicationExistingClaim }} + - name: application + mountPath: /app/samvera/hyrax-webapp + {{- end }} + {{- with .Values.worker.extraVolumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.worker.resources | nindent 12 }} volumes: - name: "derivatives" {{- if and .Values.derivativesVolume.enabled .Values.derivativesVolume.existingClaim }} @@ -75,11 +101,18 @@ persistentVolumeClaim: claimName: {{ template "hyrax.fullname" . }}-uploads {{ else }} emptyDir: {} {{ end }} - + {{- if .Values.applicationExistingClaim }} + - name: "application" + persistentVolumeClaim: + claimName: {{ .Values.applicationExistingClaim }} + {{- end }} + {{- with .Values.worker.extraVolumes }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.worker.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.worker.affinity }} @@ -88,5 +121,6 @@ {{- end }} {{- with .Values.worker.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} +{{- end }}