Storage
The Storage resources configures the following optional services:
- Supabase Storage (S3 compatible)
- Image proxy
The image proxy can be omitted if you don't need it.
The Supabase Storage service can use two different storage backends:
- an upstream S3 storage
- a local volume (e.g. a
PVC)
If you want to use another object storage (like Azure Storage Accounts), it is advised to check whether there's a Container Storage Interface (CSI) driver available that allows you to use the object storage in question as a persistent volume.
Upstream S3 storage
The following example illustrates how to connect your Storage API to an upstream S3 storage:
Please note that the credentials are referenced via a Kubernetes Secret.
The keys of the secret can be configured, but by default the Secret would look like this:
apiVersion: v1
kind: Secret
metadata:
name: storage-s3-credentials
stringData:
accessKeyId: <value>
secretAccessKey: <value>
if you want or need different secret keys, please have a look at the API reference.
Local volume
Alternatively, you can use any 'local' storage in the Pod.
It is strongly recommended to create and mount a PVC or a host path to ensure persistence, but it's strictly necessary.
The following example shows how you can configure the Storage API for local storage and how you can customize the workload to mount a volume.
Please note that, the API workload will be a Kubernetes Deployment.
But even if this would change in the future to a StatefulSet for some reason, the Storage API is really only an API and does not replicate or distribute data across instances.
In consequence, when using Kubernetes volumes, you should either use volumes that ideally support ReadWriteMany mode or you might want to configure the strategy of the Storage API workload to Recreate (see also upstream docs).
For further details on how to configure the strategy please check out the reference docs.