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 }}
|
2024-07-09 10:53:29 -05:00
|
|
|
{{- 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:
|
2024-07-09 10:53:29 -05:00
|
|
|
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 }}
|
2024-07-09 10:53:29 -05:00
|
|
|
{{- with .Values.exporter.podAnnotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2024-06-11 06:46:03 -05:00
|
|
|
spec:
|
2024-07-29 12:02:41 -05:00
|
|
|
serviceAccountName: {{ include "penpot.serviceAccountName" . }}
|
|
|
|
{{- with .Values.global.imagePullSecrets }}
|
2024-06-11 06:46:03 -05:00
|
|
|
imagePullSecrets:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.exporter.podSecurityContext }}
|
2024-06-11 06:46:03 -05:00
|
|
|
securityContext:
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- 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 }}
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- with .Values.exporter.containerSecurityContext }}
|
2024-06-11 06:46:03 -05:00
|
|
|
securityContext:
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
{{- end }}
|
2024-06-11 06:46:03 -05:00
|
|
|
env:
|
|
|
|
- name: PENPOT_PUBLIC_URI
|
2024-07-10 08:03:09 -05:00
|
|
|
value: {{ print "http://" (include "penpot.fullname" .) ":" .Values.frontend.service.port }}
|
2024-06-11 06:46:03 -05:00
|
|
|
- name: PENPOT_REDIS_URI
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- 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 }}"
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- 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 }}
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- 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 }}
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- with .Values.exporter.nodeSelector }}
|
2024-06-11 06:46:03 -05:00
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.exporter.affinity }}
|
2024-06-11 06:46:03 -05:00
|
|
|
affinity:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.exporter.tolerations }}
|
2024-06-11 06:46:03 -05:00
|
|
|
tolerations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- end }}
|
2024-06-11 06:46:03 -05:00
|
|
|
volumes:
|
|
|
|
- name: app-data
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- if .Values.persistence.exporter.enabled }}
|
2024-06-11 06:46:03 -05:00
|
|
|
persistentVolumeClaim:
|
2024-07-08 11:44:24 -05:00
|
|
|
claimName: {{ .Values.persistence.exporter.existingClaim | default ( printf "%s-%s" ( include "penpot.fullname" . ) "data-exporter" ) }}
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- else }}
|
2024-06-11 06:46:03 -05:00
|
|
|
emptyDir: {}
|
2024-07-29 12:02:41 -05:00
|
|
|
{{- end }}
|