{{- if .Values.deployment.minio.enabled -}} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "supabase.minio.fullname" . }} labels: {{- include "supabase.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.minio.enabled }} replicas: {{ .Values.deployment.minio.replicaCount }} {{- end }} selector: matchLabels: {{- include "supabase.minio.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.deployment.minio.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "supabase.minio.selectorLabels" . | nindent 8 }} spec: restartPolicy: Always {{- with .Values.image.minio.pullSecrets}} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "supabase.minio.serviceAccountName" . }} securityContext: {{- toYaml .Values.deployment.minio.podSecurityContext | nindent 8 }} containers: - name: {{ include "supabase.minio.name" $ }} securityContext: {{- toYaml .Values.deployment.minio.securityContext | nindent 12 }} image: "{{ .Values.image.minio.repository }}:{{ .Values.image.minio.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.minio.pullPolicy }} args: - server - --console-address - ":9001" - /data env: - name: MINIO_ROOT_USER valueFrom: secretKeyRef: {{- if .Values.secret.minio.secretRef }} name: {{ .Values.secret.minio.secretRef }} key: {{ .Values.secret.minio.secretRefKey.user | default "user" }} {{- else }} name: {{ include "supabase.secret.minio" . }} key: user {{- end }} - name: MINIO_ROOT_PASSWORD valueFrom: secretKeyRef: {{- if .Values.secret.s3.secretRef }} name: {{ .Values.secret.s3.secretRef }} key: {{ .Values.secret.s3.secretRefKey.password | default "password" }} {{- else }} name: {{ include "supabase.secret.minio" . }} key: password {{- end }} {{- with .Values.deployment.minio.livenessProbe }} livenessProbe: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.deployment.minio.readinessProbe }} readinessProbe: {{- toYaml . | nindent 12 }} {{- end }} ports: - name: http containerPort: 9000 protocol: TCP {{- with .Values.deployment.minio.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} volumeMounts: {{- with .Values.deployment.minio.volumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} - mountPath: /data name: minio-data {{- with .Values.deployment.minio.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.deployment.minio.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.deployment.minio.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} volumes: - name: minio-data {{- if .Values.persistence.minio.enabled }} persistentVolumeClaim: claimName: {{ include "supabase.pvc.name" (dict "root" $ "name" "minio") }} {{- else }} emptyDir: medium: "" {{- end }} {{- with .Values.deployment.minio.volumes }} {{- toYaml . | nindent 8 }} {{- end }} {{- end }}