Render store backends
How to configure the object store that keeps the applied renders, for each supported backend.
The render store is an object store. The controller-manager writes each applied render to it. The observer reads the renders from it. This page tells how to select and configure a backend. See Pin and history for what the store contains and how convoy uses it.
Configure the store#
Set --render-store-url on convoy-controller-manager and on convoy-observer. Use the same
URL on the two components and on all their replicas. An empty value disables the render store.
The flag tables are on Binaries and flags.
The value is a gocloud blob URL. convoy registers these schemes:
| Scheme | Backend | Shared between pods |
|---|---|---|
s3:// | Amazon S3, and stores that are compatible with S3 | Yes |
gs:// | Google Cloud Storage | Yes |
azblob:// | Azure Blob Storage | Yes |
file:// | A directory in the file system of the pod | Only through a shared volume |
mem:// | The memory of one process | No |
If convoy cannot open the URL, the process stops at start.
Examples from the dev overlays#
The storage-minio overlay uses an S3-compatible MinIO in the cluster:
s3://convoy-renders?endpoint=http://minio:9000®ion=us-east-1&use_path_style=true&disable_https=true&hostname_immutable=trueendpointsets the address of the store.use_path_style=trueputs the bucket name in the path, not in the host name.disable_https=trueand thehttp://endpoint send the requests without TLS. Use them only in a development cluster.
The storage-file overlay uses a PersistentVolumeClaim, mounted at /var/lib/convoy/renders:
file:///var/lib/convoy/renders?create_dir=true&no_tmp_dir=truecreate_dir=truecreates the directory if it does not exist.no_tmp_dir=truewrites the temporary file next to the final file. Without it, the write goes to/tmpfirst. The rename then fails when the volume is a different file system.
The storage-mem overlay uses mem://.
Credentials#
convoy has no credential flags for the render store. The gocloud driver of each scheme reads the credentials:
| Scheme | Credentials |
|---|---|
s3:// | The default AWS SDK credential chain. For example, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, a web identity token, or the instance role. |
gs:// | Google Application Default Credentials. |
azblob:// | AZURE_STORAGE_ACCOUNT with AZURE_STORAGE_KEY, AZURE_STORAGE_SAS_TOKEN or a connection string. Without them, the default Azure credential. |
file://, mem:// | None. |
The storage-minio overlay sets AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY from a Secret on
the two Deployments. Give the controller-manager and the observer credentials that can read the
bucket. The controller-manager also writes and deletes objects in it.
Choose a backend#
mem://: The store is in the memory of one process. It is empty after each restart.
- The observer has its own empty store.
/historyis empty, and/diff?render=fails. - Each controller-manager replica has its own store. After a failover, the new replica cannot read the renders of the previous replica.
Use mem:// only for tests.
file://: The controller-manager and the observer must mount the same volume at the same
path. The storage-file overlay uses a ReadWriteOnce PersistentVolumeClaim. All pods that mount
it must run on the same node. This works in a single-node development cluster. With more than one
node, or more than one replica, use a volume with ReadWriteMany access, or use an object store.
s3://, gs://, azblob://: All replicas of the two components can use the same bucket.
Use one of these backends when you run more than one replica. See
Scaling and high availability.
Without a render store#
convoy renders and applies as usual. These functions do not work:
/history./diff?render=.- A pin to a render that is not the current render.
- A rollback by
spec.failurePolicyto the last healthy render.
See Pin and history and Render storage.
In the code
convoy v0.9.0
internal/blobstore.Openinternal/blobstore/gocloud.go:40internal/blobstore.(*bucketStore).Listinternal/blobstore/gocloud.go:74internal/controller/release.(*Controller).persistRenderinternal/controller/release/controller.go:1775internal/renderstore.Newinternal/renderstore/renderstore.go:68internal/controllermanager.(*Options).Runinternal/controllermanager/manager.go:142internal/observermanager.(*Options).Runinternal/observermanager/manager.go:135