{{- if .Values.deployment.imgproxy.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "supabase.imgproxy.fullname" . }} labels: {{- include "supabase.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.imgproxy.enabled }} replicas: {{ .Values.deployment.imgproxy.replicaCount }} {{- end }} selector: matchLabels: {{- include "supabase.imgproxy.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.deployment.imgproxy.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "supabase.imgproxy.selectorLabels" . | nindent 8 }} spec: {{- with .Values.image.imgproxy.pullSecrets}} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "supabase.imgproxy.serviceAccountName" . }} securityContext: {{- toYaml .Values.deployment.imgproxy.podSecurityContext | nindent 8 }} containers: - name: {{ include "supabase.imgproxy.name" $ }} securityContext: {{- toYaml .Values.deployment.imgproxy.securityContext | nindent 12 }} image: "{{ .Values.image.imgproxy.repository }}:{{ .Values.image.imgproxy.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.imgproxy.pullPolicy }} env: {{- range $key, $value := .Values.environment.imgproxy }} - name: {{ $key }} value: {{ $value | quote }} {{- end }} {{- with .Values.deployment.imgproxy.livenessProbe }} livenessProbe: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.deployment.imgproxy.readinessProbe }} readinessProbe: {{- toYaml . | nindent 12 }} {{- end }} ports: - name: http containerPort: 8080 protocol: TCP {{- if or (.Values.persistence.imgproxy.enabled) (.Values.deployment.imgproxy.volumes) }} volumeMounts: {{- with .Values.deployment.imgproxy.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} {{- if .Values.persistence.imgproxy.enabled }} - mountPath: /var/lib/storage name: imgproxy-volume {{- end }} {{- end }} {{- with .Values.deployment.imgproxy.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} {{- if or (.Values.persistence.imgproxy.enabled) (.Values.deployment.imgproxy.volumes) }} volumes: {{- with .Values.deployment.imgproxy.volumes }} {{- toYaml . | nindent 8 }} {{- end }} {{- if .Values.persistence.imgproxy.enabled }} - name: imgproxy-volume persistentVolumeClaim: claimName: {{ include "supabase.pvc.name" (dict "root" $ "name" "imgproxy") }} {{- end }} {{- end }} {{- include "supabase.enforcedGeneralNodeSelector" (dict "nodeSelector" .Values.deployment.imgproxy.nodeSelector) | nindent 6 }} {{- include "supabase.enforcedGeneralAffinity" (dict "affinity" .Values.deployment.imgproxy.affinity) | nindent 6 }} {{- with .Values.deployment.imgproxy.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end }}