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_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 }}