[FEATURE] Add support for emptyDir file storage #244
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TLDR: Adds support for ephemeral emptyDir storage as an alternative to PersistentVolumeClaims when using file-based Perses databases.
Motivation
StatefulSets with PVCs aren't always necessary for Perses. Since the operator creates projects, datasources, and dashboards via HTTP requests on pod startup, ephemeral storage works well for e.g. read-only instances. This eliminates provisioning persistent disks or configuring external databases for such use cases.
This approach follows the Prometheus Operator pattern, which even defaults to emptyDir storage when no storage configuration is specified.
Usage
Creates a Deployment with ephemeral storage. Data is lost on pod restart. Note that the
storageClassandsizefields are ignored when settinguseEmptyDir: true, which also follows the example set by the Prometheus operator.WDYT?