cubestore
by lvauvillier
A Helm chart for Cubestore
About this chart
Cubestore Chart
Get Helm Repository Info
helm repo add gadsme https://gadsme.github.io/charts
helm repo update
See helm repo for command documentation.
Install Chart
helm install [RELEASE_NAME] gadsme/cubestore
The command deploys Cubestore on the Kubernetes cluster using the default configuration.
See configuration below.
See helm install for command documentation.
Uninstall Chart
helm uninstall [RELEASE_NAME]
This removes all the Kubernetes components associated with the chart and deletes the release.
See helm uninstall for command documentation.
Upgrading Chart
helm upgrade [RELEASE_NAME] gadsme/cubestore --install
Configuration
By default, a router and two workers will be deployed. You can customize the deployment using helm values.
Refer to the official documentation for more information: https://cube.dev/docs/reference/environment-variables#cube-store
Example
Deployment with:
- 3 workers
- GCP cloud storage (using a secret)
$ helm install my-release \
--set workers.workersCount=3 \
--set cloudStorage.gcp.credentialsFromSecret.name=<service-account-secret-name> \
--set cloudStorage.gcp.credentialsFromSecret.key=<service-account-secret-key> \
--set cloudStorage.gcp.bucket=<my-bucket>
gadsme/cubestore
Persistence
Remote dir
By default, a shared remoteDir is created to store metadata and datasets if no cloudstorage is configured.
Prefer using cloudStorage if you are running on gcp or aws.
Local dir
By default, local dir is not persisted. You can enable persistence on router and master.
Parameters
Common parameters
| Name | Description | Value |
|---|---|---|
nameOverride | Override the name | "" |
fullnameOverride | Provide a name to substitute for the full names of resources | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
extraEnvVars | Extra environment variables to pass on to all pods (router and workers). The value is evaluated as a template | [] |
extraEnvVarsFromConfigMap | Name of a Config Map containing extra environment variables to pass on to all pods (router and workers) | |
extraEnvVarsFromSecret | Name of a Secret containing extra environment variables to pass on to all pods (router and workers) |
Image parameters
| Name | Description | Value |
|---|---|---|
image.repository | Cubestore image repository | cubejs/cubestore |
image.tag | Cubestore image tag (immutable tags are recommended) | 1.2.0 |
image.pullPolicy | Cubestore image pull policy | IfNotPresent |
image.pullSecrets | If defined, uses a Secret to pull an image from a private Docker registry or repository | [] |
Global parameters
| Name | Description | Value |
|---|---|---|
config.logLevel | The logging level for Cube Store | error |
config.noUpload | If true, prevents uploading serialized pre-aggregations to cloud storage | |
config.jobRunners | The number of parallel tasks that process non-interactive jobs like data insertion, compaction etc. Defaults to 4 | |
config.telemetry | If true, then send telemetry to Cube | false |
config.queryTimeout | The timeout for SQL queries in seconds. Defaults to 120 | |
config.selectWorkers | The number of Cube Store sub-processes that handle SELECT queries. Defaults to 4 | |
config.walSplitThreshold | The maximum number of rows to keep in a single chunk of data right after insertion. Defaults to 262144 | |
config.selectWorkerStackSize | The stack size in bytes of each select worker thread. Defaults to 4194304 (4 MiB) | |
config.mainStackSize | The stack size in bytes of each thread of the main Cube Store process. Defaults to 8388608 (8 MiB) | |
config.csvImportJobRunners | The number of job runners reserved for CSV imports. Defaults to 1 | |
config.loadAwareImportPlacement | If true, CSV imports go to the worker with the fewest imports in progress. Defaults to true | |
config.maxConcurrentQueryPlans | The maximum number of queries planned at the same time (auto or a number). Defaults to auto | |
config.maxQueuedQueryPlans | The maximum number of queries waiting for a planning slot. 0 disables the limit. Defaults to 5000 | |
config.maxQueryPlanDepth | The maximum nesting depth of a query plan. Defaults to 150 | |
config.sqlParserRecursionLimit | The maximum nesting depth of expressions, subqueries and parentheses in one SQL statement. Defaults to 128 | |
config.groupByLimitFactor | Controls when a worker trims partial aggregates to the top groups for GROUP BY, ORDER BY and LIMIT queries. Defaults to 2 | |
config.groupByLimitPerPartition | If true, a worker runs the partial hash aggregate on each partition separately when trimming. Defaults to true | |
config.topkStrategy | The strategy used to merge worker results for top-k queries (full_merge, streaming, vectorized_streaming). Defaults to full_merge | |
config.coalesceUnderHashAggregate | If true, replaces the sort-preserving merge before a grouped hash aggregate with a partition coalesce. Defaults to false | |
config.cacheEvictionSizeClasses | Size class boundaries for cache store eviction, e.g. 1KiB,256KiB. System setting, changing it is discouraged. Defaults to 1KiB | |
config.cacheMaxEntrySize | The maximum size of a single entry in the cache store. Defaults to 63MiB | |
config.queryCacheStaleWhileRevalidate | The number of seconds an expired SQL result cache entry is still served while it is refreshed. Defaults to 0 (disabled) | |
config.chunksCountThreshold | The number of chunks a partition can accumulate before they are compacted. Defaults to 4 | |
config.compactionReadinessChunksThreshold | The number of chunks at which partitions are considered ready during table creation. Must not be lower than chunksCountThreshold | |
config.repartitionConcurrentDownload | If true, downloads the chunk files of a merge group concurrently when repartitioning. Defaults to true | |
config.repartitionMergeMaxRows | The maximum total number of rows merged in one merge group when repartitioning. Defaults to 400000 | |
config.repartitionStrategy | The strategy used to move chunks of a split partition (per_chunk, per_partition, range). Defaults to range | |
config.transportMaxFrameSize | The maximum size of a WebSocket frame between Cube and Cube Store, from 4MiB to 256MiB. Defaults to 64MiB | |
config.transportMaxMessageSize | The maximum size of a WebSocket message between Cube and Cube Store, from 16MiB to 256MiB. Defaults to 64MiB | |
config.maxWsConnectionsPerUser | The maximum number of concurrent WebSocket connections per authenticated user, per node. Defaults to 0 (no limit) | |
config.metastoreBatchRpc | If true, batches metastore requests during imports, streaming, compaction and repartitioning. Defaults to true | |
config.streamingLagTimeoutMs | The timeout in milliseconds of Kafka latest-offset requests used to compute the streaming lag. Defaults to 5000 |
Remote dir parameters
| Name | Description | Value |
|---|---|---|
remoteDir.persistence.resourcePolicy | Setting it to "keep" to avoid removing PVCs during a helm delete operation | keep |
remoteDir.persistence.size | Persistent Volume size | 10Gi |
remoteDir.persistence.annotations | Additional custom annotations for the PVC | {} |
remoteDir.persistence.accessModes | Persistent Volume access modes | [ReadWriteOnce] |
remoteDir.persistence.storageClass | The storage class to use for the remoteDir pvc | "" |
Cloud Storage parameters
| Name | Description | Value |
|---|---|---|
cloudStorage.gcp.credentials | A Base64 encoded JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage | |
cloudStorage.gcp.credentialsFromSecret.name | A Base64 encoded JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage (using secret) | |
cloudStorage.gcp.credentialsFromSecret.key | A Base64 encoded JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage (using secret) | |
cloudStorage.gcp.keyFile | The path to a JSON key file for connecting to Google Cloud. Alternative to credentials | |
cloudStorage.gcp.bucket | The name of a bucket in GCS. Required when using GCS | |
cloudStorage.gcp.subPath | The path in a GCS bucket to store pre-aggregations. Optional | |
cloudStorage.aws.accessKeyID | The Access Key ID for AWS. Required when using AWS S3 | |
cloudStorage.aws.secretKey | The Secret Access Key for AWS. Required when using AWS S3 | |
cloudStorage.aws.secretKeyFromSecret.name | The Secret Access Key for AWS. Required when using AWS S3 (using secret) | |
cloudStorage.aws.secretKeyFromSecret.key | The Secret Access Key for AWS. Required when using AWS S3 (using secret) | |
cloudStorage.aws.bucket | The name of a bucket in AWS S3. Required when using AWS S3 | |
| `cloudStorage.aws.regio |
Deploy cubestore with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cubestore on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcubestore is pinned at v1.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply