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/frontend-deployment.yml
David Barragán Merino 7793224e3b chore: bump to 0.2.0
2024-10-10 13:59:57 +02:00

85 lines
3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "penpot.fullname" . }}-frontend
namespace: {{ .Release.Namespace }}
labels:
{{- include "penpot.labels" . | nindent 4 }}
{{- with .Values.frontend.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "penpot.frontendSelectorLabels" . | nindent 6 }}
replicas: {{ .Values.frontend.replicaCount }}
template:
metadata:
labels:
app: penpot-frontend
{{- include "penpot.frontendSelectorLabels" . | nindent 8 }}
{{- with .Values.frontend.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "penpot.serviceAccountName" . }}
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-frontend
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }}"
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
{{- with .Values.frontend.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: PENPOT_FLAGS
value: "$PENPOT_FLAGS {{ .Values.config.flags }}"
- name: PENPOT_PUBLIC_URI
value: {{ .Values.config.publicUri | quote }}
- name: PENPOT_BACKEND_URI
value: {{ print "http://" (include "penpot.fullname" .) "-backend:" .Values.backend.service.port }}
- name: PENPOT_EXPORTER_URI
value: {{ print "http://" (include "penpot.fullname" .) "-exporter:" .Values.exporter.service.port }}
volumeMounts:
- mountPath: /opt/data/assets
name: app-data
readOnly: false
ports:
- name: http
containerPort: {{ .Values.frontend.service.port }}
protocol: TCP
resources:
{{- toYaml .Values.frontend.resources | nindent 12 }}
{{- with .Values.frontend.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: app-data
{{- if .Values.persistence.assets.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.assets.existingClaim | default ( printf "%s-%s" ( include "penpot.fullname" . ) "data-assets" ) }}
{{- else }}
emptyDir: {}
{{- end }}