mirror of
https://github.com/penpot/penpot-helm.git
synced 2024-12-22 21:53:14 -05:00
87 lines
3.2 KiB
YAML
87 lines
3.2 KiB
YAML
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 }}
|
|
spec:
|
|
replicas: {{ .Values.exporter.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "penpot.exporterSelectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: penpot-exporter
|
|
{{- include "penpot.exporterSelectorLabels" . | nindent 8 }}
|
|
{{- with .Values.exporter.podLabels }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.exporter.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
serviceAccountName: {{ include "penpot.serviceAccountName" . }}
|
|
{{- with .Values.global.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.exporter.podSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}-exporter
|
|
image: "{{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }}"
|
|
imagePullPolicy: {{ .Values.exporter.image.imagePullPolicy }}
|
|
{{- with .Values.exporter.containerSecurityContext }}
|
|
securityContext:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
env:
|
|
- name: PENPOT_PUBLIC_URI
|
|
value: {{ print "http://" (include "penpot.fullname" .) ":" .Values.frontend.service.port }}
|
|
- name: PENPOT_REDIS_URI
|
|
{{- if .Values.config.redis.host }}
|
|
value: "redis://{{ .Values.config.redis.host }}:{{ .Values.config.redis.port }}/{{ .Values.config.redis.database }}"
|
|
{{- else }}
|
|
value: {{ print "redis://" (include "penpot.fullname" .) "-redis-master:" .Values.config.redis.port "/" .Values.config.redis.database }}
|
|
{{- end }}
|
|
- 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 }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.exporter.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.exporter.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: app-data
|
|
{{- if .Values.persistence.exporter.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.persistence.exporter.existingClaim | default ( printf "%s-%s" ( include "penpot.fullname" . ) "data-exporter" ) }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- end }}
|