cubestore

by lvauvillier

Helm chartv1.3.0App 1.8.16

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

NameDescriptionValue
nameOverrideOverride the name""
fullnameOverrideProvide a name to substitute for the full names of resources""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
extraEnvVarsExtra environment variables to pass on to all pods (router and workers). The value is evaluated as a template[]
extraEnvVarsFromConfigMapName of a Config Map containing extra environment variables to pass on to all pods (router and workers)
extraEnvVarsFromSecretName of a Secret containing extra environment variables to pass on to all pods (router and workers)

Image parameters

NameDescriptionValue
image.repositoryCubestore image repositorycubejs/cubestore
image.tagCubestore image tag (immutable tags are recommended)1.2.0
image.pullPolicyCubestore image pull policyIfNotPresent
image.pullSecretsIf defined, uses a Secret to pull an image from a private Docker registry or repository[]

Global parameters

NameDescriptionValue
config.logLevelThe logging level for Cube Storeerror
config.noUploadIf true, prevents uploading serialized pre-aggregations to cloud storage
config.jobRunnersThe number of parallel tasks that process non-interactive jobs like data insertion, compaction etc. Defaults to 4
config.telemetryIf true, then send telemetry to Cubefalse
config.queryTimeoutThe timeout for SQL queries in seconds. Defaults to 120
config.selectWorkersThe number of Cube Store sub-processes that handle SELECT queries. Defaults to 4
config.walSplitThresholdThe maximum number of rows to keep in a single chunk of data right after insertion. Defaults to 262144
config.selectWorkerStackSizeThe stack size in bytes of each select worker thread. Defaults to 4194304 (4 MiB)
config.mainStackSizeThe stack size in bytes of each thread of the main Cube Store process. Defaults to 8388608 (8 MiB)
config.csvImportJobRunnersThe number of job runners reserved for CSV imports. Defaults to 1
config.loadAwareImportPlacementIf true, CSV imports go to the worker with the fewest imports in progress. Defaults to true
config.maxConcurrentQueryPlansThe maximum number of queries planned at the same time (auto or a number). Defaults to auto
config.maxQueuedQueryPlansThe maximum number of queries waiting for a planning slot. 0 disables the limit. Defaults to 5000
config.maxQueryPlanDepthThe maximum nesting depth of a query plan. Defaults to 150
config.sqlParserRecursionLimitThe maximum nesting depth of expressions, subqueries and parentheses in one SQL statement. Defaults to 128
config.groupByLimitFactorControls when a worker trims partial aggregates to the top groups for GROUP BY, ORDER BY and LIMIT queries. Defaults to 2
config.groupByLimitPerPartitionIf true, a worker runs the partial hash aggregate on each partition separately when trimming. Defaults to true
config.topkStrategyThe strategy used to merge worker results for top-k queries (full_merge, streaming, vectorized_streaming). Defaults to full_merge
config.coalesceUnderHashAggregateIf true, replaces the sort-preserving merge before a grouped hash aggregate with a partition coalesce. Defaults to false
config.cacheEvictionSizeClassesSize class boundaries for cache store eviction, e.g. 1KiB,256KiB. System setting, changing it is discouraged. Defaults to 1KiB
config.cacheMaxEntrySizeThe maximum size of a single entry in the cache store. Defaults to 63MiB
config.queryCacheStaleWhileRevalidateThe number of seconds an expired SQL result cache entry is still served while it is refreshed. Defaults to 0 (disabled)
config.chunksCountThresholdThe number of chunks a partition can accumulate before they are compacted. Defaults to 4
config.compactionReadinessChunksThresholdThe number of chunks at which partitions are considered ready during table creation. Must not be lower than chunksCountThreshold
config.repartitionConcurrentDownloadIf true, downloads the chunk files of a merge group concurrently when repartitioning. Defaults to true
config.repartitionMergeMaxRowsThe maximum total number of rows merged in one merge group when repartitioning. Defaults to 400000
config.repartitionStrategyThe strategy used to move chunks of a split partition (per_chunk, per_partition, range). Defaults to range
config.transportMaxFrameSizeThe maximum size of a WebSocket frame between Cube and Cube Store, from 4MiB to 256MiB. Defaults to 64MiB
config.transportMaxMessageSizeThe maximum size of a WebSocket message between Cube and Cube Store, from 16MiB to 256MiB. Defaults to 64MiB
config.maxWsConnectionsPerUserThe maximum number of concurrent WebSocket connections per authenticated user, per node. Defaults to 0 (no limit)
config.metastoreBatchRpcIf true, batches metastore requests during imports, streaming, compaction and repartitioning. Defaults to true
config.streamingLagTimeoutMsThe timeout in milliseconds of Kafka latest-offset requests used to compute the streaming lag. Defaults to 5000

Remote dir parameters

NameDescriptionValue
remoteDir.persistence.resourcePolicySetting it to "keep" to avoid removing PVCs during a helm delete operationkeep
remoteDir.persistence.sizePersistent Volume size10Gi
remoteDir.persistence.annotationsAdditional custom annotations for the PVC{}
remoteDir.persistence.accessModesPersistent Volume access modes[ReadWriteOnce]
remoteDir.persistence.storageClassThe storage class to use for the remoteDir pvc""

Cloud Storage parameters

NameDescriptionValue
cloudStorage.gcp.credentialsA Base64 encoded JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage
cloudStorage.gcp.credentialsFromSecret.nameA Base64 encoded JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage (using secret)
cloudStorage.gcp.credentialsFromSecret.keyA Base64 encoded JSON key file for connecting to Google Cloud. Required when using Google Cloud Storage (using secret)
cloudStorage.gcp.keyFileThe path to a JSON key file for connecting to Google Cloud. Alternative to credentials
cloudStorage.gcp.bucketThe name of a bucket in GCS. Required when using GCS
cloudStorage.gcp.subPathThe path in a GCS bucket to store pre-aggregations. Optional
cloudStorage.aws.accessKeyIDThe Access Key ID for AWS. Required when using AWS S3
cloudStorage.aws.secretKeyThe Secret Access Key for AWS. Required when using AWS S3
cloudStorage.aws.secretKeyFromSecret.nameThe Secret Access Key for AWS. Required when using AWS S3 (using secret)
cloudStorage.aws.secretKeyFromSecret.keyThe Secret Access Key for AWS. Required when using AWS S3 (using secret)
cloudStorage.aws.bucketThe 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcubestore is pinned at v1.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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