{{- if .Values.instance.zeoclient }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "portalmodelo.fullname" . }}-zeoserver labels: {{- include "portalmodelo.labels" . | nindent 4 }} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: {{- include "portalmodelo.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "portalmodelo.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" name: {{ .Release.Name }}-rmlock command: - "rm" - "-f" - "/data/filestorage/Data.fs.lock" volumeMounts: - mountPath: /data name: data - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" name: {{ .Release.Name }}-initzeo command: - "mkdir" - "-p" - "/data/filestorage" - "/data/blobstorage" - "/data/zeoserver" - "/data/log" volumeMounts: - mountPath: /data name: data containers: - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" args: - zeoserver env: - name: ZEO_SHARED_BLOB_DIR value: "on" - name: TZ value: {{ .Values.portal.timeZone }} imagePullPolicy: {{ .Values.image.pullPolicy }} name: {{ .Release.Name }}-zeoserver ports: - containerPort: 8100 volumeMounts: - mountPath: /data name: data resources: {{- toYaml .Values.resources.zeo | nindent 12 }} restartPolicy: Always volumes: - name: data {{- if .Values.persistence.enabled }} persistentVolumeClaim: claimName: data {{- else }} emptyDir: {} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end}}