|
| 1 | +{{- if .Values.enabled }} |
| 2 | +apiVersion: apps/v1 |
| 3 | +kind: Deployment |
| 4 | +metadata: |
| 5 | + name: {{ include "eqty-pdfgen.fullname" . }} |
| 6 | + labels: |
| 7 | + {{- include "eqty-pdfgen.labels" . | nindent 4 }} |
| 8 | +spec: |
| 9 | + {{- if not .Values.autoscaling.enabled }} |
| 10 | + replicas: {{ .Values.replicaCount }} |
| 11 | + {{- end }} |
| 12 | + selector: |
| 13 | + matchLabels: |
| 14 | + {{- include "eqty-pdfgen.selectorLabels" . | nindent 6 }} |
| 15 | + template: |
| 16 | + metadata: |
| 17 | + labels: |
| 18 | + {{- include "eqty-pdfgen.selectorLabels" . | nindent 8 }} |
| 19 | + {{- with .Values.podLabels }} |
| 20 | + {{- toYaml . | nindent 8 }} |
| 21 | + {{- end }} |
| 22 | + {{- with .Values.podAnnotations }} |
| 23 | + annotations: |
| 24 | + {{- toYaml . | nindent 8 }} |
| 25 | + {{- end }} |
| 26 | + spec: |
| 27 | + {{- if and .Values.global (((.Values.global).secrets).imageRegistry).secretName }} |
| 28 | + imagePullSecrets: |
| 29 | + - name: {{ ((.Values.global).secrets).imageRegistry.secretName }} |
| 30 | + {{- else if .Values.imagePullSecrets }} |
| 31 | + imagePullSecrets: |
| 32 | + {{- toYaml .Values.imagePullSecrets | nindent 8 }} |
| 33 | + {{- end }} |
| 34 | + {{- if or .Values.serviceAccount.create .Values.serviceAccount.name }} |
| 35 | + serviceAccountName: {{ .Values.serviceAccount.name | default (include "eqty-pdfgen.fullname" .) }} |
| 36 | + automountServiceAccountToken: {{ .Values.serviceAccount.automount }} |
| 37 | + {{- end }} |
| 38 | + {{- with .Values.podSecurityContext }} |
| 39 | + securityContext: |
| 40 | + {{- toYaml . | nindent 8 }} |
| 41 | + {{- end }} |
| 42 | + {{- with .Values.nodeSelector }} |
| 43 | + nodeSelector: |
| 44 | + {{- toYaml . | nindent 8 }} |
| 45 | + {{- end }} |
| 46 | + {{- with .Values.affinity }} |
| 47 | + affinity: |
| 48 | + {{- toYaml . | nindent 8 }} |
| 49 | + {{- end }} |
| 50 | + {{- with .Values.tolerations }} |
| 51 | + tolerations: |
| 52 | + {{- toYaml . | nindent 8 }} |
| 53 | + {{- end }} |
| 54 | + containers: |
| 55 | + - name: {{ .Chart.Name }} |
| 56 | + {{- with .Values.securityContext }} |
| 57 | + securityContext: |
| 58 | + {{- toYaml . | nindent 12 }} |
| 59 | + {{- end }} |
| 60 | + image: {{ include "eqty-pdfgen.image" . | quote }} |
| 61 | + imagePullPolicy: {{ .Values.image.pullPolicy | default ((.Values.global).imagePullPolicy | default "IfNotPresent") }} |
| 62 | + env: |
| 63 | + - name: HOST |
| 64 | + value: {{ .Values.config.host | quote }} |
| 65 | + - name: PORT |
| 66 | + value: {{ (.Values.config.port | default .Values.service.port) | quote }} |
| 67 | + - name: PDFGEN_TMP_DIR |
| 68 | + value: {{ .Values.config.tmpDir | quote }} |
| 69 | + - name: TYPST_FONT_PATHS |
| 70 | + value: {{ .Values.config.typstFontPaths | quote }} |
| 71 | + - name: TYPST_PACKAGE_CACHE_PATH |
| 72 | + value: {{ .Values.config.typstPackageCachePath | quote }} |
| 73 | + - name: EQTY_TIMESTAMP_URL |
| 74 | + value: {{ .Values.config.timestampUrl | quote }} |
| 75 | + - name: EQTY_SIGNING_URL |
| 76 | + value: {{ include "eqty-pdfgen.signingUrl" . | quote }} |
| 77 | + {{- with .Values.extraEnvVars }} |
| 78 | + {{- toYaml . | nindent 12 }} |
| 79 | + {{- end }} |
| 80 | + {{- if or .Values.extraEnvVarsSecret .Values.extraEnvVarsConfigMap }} |
| 81 | + envFrom: |
| 82 | + {{- if .Values.extraEnvVarsSecret }} |
| 83 | + - secretRef: |
| 84 | + name: {{ .Values.extraEnvVarsSecret | quote }} |
| 85 | + {{- end }} |
| 86 | + {{- if .Values.extraEnvVarsConfigMap }} |
| 87 | + - configMapRef: |
| 88 | + name: {{ .Values.extraEnvVarsConfigMap | quote }} |
| 89 | + {{- end }} |
| 90 | + {{- end }} |
| 91 | + ports: |
| 92 | + - name: http |
| 93 | + containerPort: {{ .Values.config.port | default .Values.service.port }} |
| 94 | + protocol: TCP |
| 95 | + {{- with .Values.startupProbe }} |
| 96 | + startupProbe: |
| 97 | + {{- toYaml . | nindent 12 }} |
| 98 | + {{- end }} |
| 99 | + {{- with .Values.livenessProbe }} |
| 100 | + livenessProbe: |
| 101 | + {{- toYaml . | nindent 12 }} |
| 102 | + {{- end }} |
| 103 | + {{- with .Values.readinessProbe }} |
| 104 | + readinessProbe: |
| 105 | + {{- toYaml . | nindent 12 }} |
| 106 | + {{- end }} |
| 107 | + {{- with .Values.resources }} |
| 108 | + resources: |
| 109 | + {{- toYaml . | nindent 12 }} |
| 110 | + {{- end }} |
| 111 | + volumeMounts: |
| 112 | + - name: render-tmp |
| 113 | + mountPath: {{ include "eqty-pdfgen.renderTmpPath" . }} |
| 114 | + - name: os-tmp |
| 115 | + mountPath: /tmp |
| 116 | + volumes: |
| 117 | + - name: render-tmp |
| 118 | + emptyDir: {} |
| 119 | + - name: os-tmp |
| 120 | + emptyDir: {} |
| 121 | +{{- end }} |
0 commit comments