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

86 lines
3 KiB
YAML
Raw Normal View History

2024-06-11 06:46:03 -05:00
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 }}
2024-06-11 06:46:03 -05:00
spec:
selector:
matchLabels:
{{- include "penpot.frontendSelectorLabels" . | nindent 6 }}
replicas: {{ .Values.frontend.replicaCount }}
template:
metadata:
labels:
app: penpot-frontend
{{- include "penpot.frontendSelectorLabels" . | nindent 8 }}
2024-07-10 08:24:35 -05:00
{{- with .Values.frontend.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.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.frontend.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
2024-06-11 06:46:03 -05:00
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 }}
2024-06-11 06:46:03 -05:00
env:
- name: PENPOT_FLAGS
value: "$PENPOT_FLAGS {{ .Values.config.flags }}"
2024-10-10 06:59:44 -05:00
- name: PENPOT_PUBLIC_URI
value: {{ .Values.config.publicUri | quote }}
2024-06-11 06:46:03 -05:00
- name: PENPOT_BACKEND_URI
2024-07-09 11:08:53 -05:00
value: {{ print "http://" (include "penpot.fullname" .) "-backend:" .Values.backend.service.port }}
2024-06-11 06:46:03 -05:00
- 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 }}
2024-06-11 06:46:03 -05:00
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.affinity }}
2024-06-11 06:46:03 -05:00
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.frontend.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.assets.enabled }}
2024-06-11 06:46:03 -05:00
persistentVolumeClaim:
claimName: {{ .Values.persistence.assets.existingClaim | default ( printf "%s-%s" ( include "penpot.fullname" . ) "data-assets" ) }}
{{- else }}
2024-06-11 06:46:03 -05:00
emptyDir: {}
{{- end }}