0
Fork 0
mirror of https://github.com/penpot/penpot-helm.git synced 2024-12-22 13:43:01 -05:00
penpot-helm/charts/penpot/templates/exporter-deployment.yml

88 lines
3.2 KiB
YAML
Raw Permalink Normal View History

2024-06-11 06:46:03 -05:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "penpot.fullname" . }}-exporter
namespace: {{ .Release.Namespace }}
labels:
{{- include "penpot.labels" . | nindent 4 }}
{{- with .Values.exporter.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
2024-06-11 06:46:03 -05:00
spec:
replicas: {{ .Values.exporter.replicaCount }}
selector:
matchLabels:
{{- include "penpot.exporterSelectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: penpot-exporter
2024-06-11 06:46:03 -05:00
{{- include "penpot.exporterSelectorLabels" . | nindent 8 }}
2024-07-10 08:24:35 -05:00
{{- with .Values.exporter.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.exporter.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
2024-06-11 06:46:03 -05:00
spec:
serviceAccountName: {{ include "penpot.serviceAccountName" . }}
{{- with .Values.global.imagePullSecrets }}
2024-06-11 06:46:03 -05:00
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.exporter.podSecurityContext }}
2024-06-11 06:46:03 -05:00
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
2024-06-11 06:46:03 -05:00
containers:
- name: {{ .Chart.Name }}-exporter
image: "{{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }}"
imagePullPolicy: {{ .Values.exporter.image.imagePullPolicy }}
{{- with .Values.exporter.containerSecurityContext }}
2024-06-11 06:46:03 -05:00
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
2024-06-11 06:46:03 -05:00
env:
- name: PENPOT_PUBLIC_URI
value: {{ print "http://" (include "penpot.fullname" .) ":" .Values.frontend.service.port }}
2024-06-11 06:46:03 -05:00
- name: PENPOT_REDIS_URI
{{- if .Values.config.redis.host }}
2024-06-11 06:46:03 -05:00
value: "redis://{{ .Values.config.redis.host }}:{{ .Values.config.redis.port }}/{{ .Values.config.redis.database }}"
{{- else }}
2024-06-11 06:46:03 -05:00
value: {{ print "redis://" (include "penpot.fullname" .) "-redis-master:" .Values.config.redis.port "/" .Values.config.redis.database }}
{{- end }}
2024-06-11 06:46:03 -05:00
- name: PENPOT_TEMPDIR
value: "/tmp/penpot-exporter"
volumeMounts:
- mountPath: /tmp/penpot-exporter
name: app-data
readOnly: false
ports:
- name: http
containerPort: {{ .Values.exporter.service.port }}
protocol: TCP
resources:
{{- toYaml .Values.exporter.resources | nindent 12 }}
{{- with .Values.exporter.nodeSelector }}
2024-06-11 06:46:03 -05:00
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.exporter.affinity }}
2024-06-11 06:46:03 -05:00
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.exporter.tolerations }}
2024-06-11 06:46:03 -05:00
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
2024-06-11 06:46:03 -05:00
volumes:
- name: app-data
{{- if .Values.persistence.exporter.enabled }}
2024-06-11 06:46:03 -05:00
persistentVolumeClaim:
claimName: {{ .Values.persistence.exporter.existingClaim | default ( printf "%s-%s" ( include "penpot.fullname" . ) "data-exporter" ) }}
{{- else }}
2024-06-11 06:46:03 -05:00
emptyDir: {}
{{- end }}