|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: {{ include "helm-metadata-editor.fullname" . }}-metadata-editor-deployment |
| 5 | + labels: |
| 6 | + {{- include "helm-metadata-editor.labels" . | nindent 4 }} |
| 7 | +spec: |
| 8 | + replicas: {{ .Values.replicaCount }} |
| 9 | + selector: |
| 10 | + matchLabels: |
| 11 | + {{- include "helm-metadata-editor.selectorLabels" . | nindent 6 }} |
| 12 | + template: |
| 13 | + metadata: |
| 14 | + {{- with .Values.podAnnotations }} |
| 15 | + annotations: |
| 16 | + {{- toYaml . | nindent 8 }} |
| 17 | + {{- end }} |
| 18 | + labels: |
| 19 | + {{- include "helm-metadata-editor.selectorLabels" . | nindent 8 }} |
| 20 | + org.geonetwork.service/name: {{ include "helm-metadata-editor.fullname" . }}-metadata-editor-deployment |
| 21 | + spec: |
| 22 | + {{- if .Values.configuration.git.url }} |
| 23 | + initContainers: |
| 24 | + {{- include "metadata-editor.bootstrap_metadata-editor_configuration" $ | nindent 6 }} |
| 25 | + {{- end }} |
| 26 | + {{- with .Values.imagePullSecrets }} |
| 27 | + imagePullSecrets: |
| 28 | + {{- toYaml . | nindent 8 }} |
| 29 | + {{- end }} |
| 30 | + securityContext: |
| 31 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 32 | + containers: |
| 33 | + - name: {{ .Chart.Name }} |
| 34 | + securityContext: |
| 35 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 36 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 37 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 38 | + ports: |
| 39 | + - name: http |
| 40 | + containerPort: 80 |
| 41 | + protocol: TCP |
| 42 | + livenessProbe: |
| 43 | + httpGet: |
| 44 | + path: / |
| 45 | + port: http |
| 46 | + readinessProbe: |
| 47 | + httpGet: |
| 48 | + path: / |
| 49 | + port: http |
| 50 | + {{- with .Values.lifecycle }} |
| 51 | + lifecycle: |
| 52 | + {{- toYaml . | nindent 12 }} |
| 53 | + {{- end }} |
| 54 | + resources: |
| 55 | + {{- toYaml .Values.resources | nindent 12 }} |
| 56 | + env: |
| 57 | + - name: CONFIG_DIRECTORY_OVERRIDE |
| 58 | + value: "/etc/metadata-editor/{{ .Values.configuration.override_directories.config_directory_override }}" |
| 59 | + - name: ASSETS_DIRECTORY_OVERRIDE |
| 60 | + value: "/etc/metadata-editor/{{ .Values.configuration.override_directories.assets_directory_override }}" |
| 61 | + {{- with .Values.extra_environment }} |
| 62 | + {{- toYaml . | nindent 12 }} |
| 63 | + {{- end }} |
| 64 | + volumeMounts: |
| 65 | + - name: metadata-editor-configuration |
| 66 | + mountPath: /etc/metadata-editor |
| 67 | + volumes: |
| 68 | + - name: metadata-editor-configuration |
| 69 | + emptyDir: {} |
| 70 | + {{- if .Values.configuration.git.ssh_secret }} |
| 71 | + - name: ssh-secret |
| 72 | + secret: |
| 73 | + secretName: {{ .Values.configuration.git.ssh_secret }} |
| 74 | + defaultMode: 0400 |
| 75 | + {{- end }} |
| 76 | + {{- with .Values.nodeSelector }} |
| 77 | + nodeSelector: |
| 78 | + {{- toYaml . | nindent 8 }} |
| 79 | + {{- end }} |
| 80 | + {{- with .Values.affinity }} |
| 81 | + affinity: |
| 82 | + {{- toYaml . | nindent 8 }} |
| 83 | + {{- end }} |
| 84 | + {{- with .Values.tolerations }} |
| 85 | + tolerations: |
| 86 | + {{- toYaml . | nindent 8 }} |
| 87 | + {{- end }} |
0 commit comments