Skip to main content

EloqDBClusterTemplate

Overview

EloqDBClusterTemplate defines reusable configuration blueprints for database clusters. Administrators use templates to standardize performance tiers, storage backends, and deployment modes across different user protocols (EloqSQL, EloqKV, EloqDoc). A template encapsulates complex infrastructure requirements, including CPU/Memory resources, cloud-specific storage settings, and image versions, which users then reference in their EloqDBClusterClaim.

info

Throughout this documentation, we use eloqdb-clusters as the example namespace. Please replace it with your own namespace in actual usage.

Complete Example

Below is a template for an EloqDoc (MongoDB-compatible) cluster using AWS S3 for persistent data and log state storage:

apiVersion: eloqdbcluster.eloqdata.com/v1alpha1
kind: EloqDBClusterTemplate
metadata:
name: pool-eloqdoc-1c-8g
namespace: eloqdb-clusters
spec:
serviceAccountName: eloq-dbcluster-sa
s3SecretName: eloqstore-credentials
clusterDeployMode: txWithInternalLog
tx:
module:
type: eloqdoc
port: 27017
replica: 1
resources:
requests:
memory: "8Gi"
cpu: "1"
image: "eloqdata/eloqdoc-eloqstore-s3:0.3.0"
ephemeralVolume:
size: "90Gi"
store:
storageType: eloqStore
objectStorageType: s3
eloqStore:
cloudStorePath: "eloqcloud-aws-us-west-1/eloqdoc-1c-8g-store"
cloudRegion: "us-west-1"
# Log Service Configuration
log:
persistentVolume:
size: "10Gi"
diskType: "gp3"
store:
storageType: rocksdbCloud
objectStorageType: s3
rocksdbCloud:
bucketName: "eloqcloud-aws-us-west-1"
objectPath: "eloqdoc-1c-8g-log"

Phase and Conditions

Template Phases

The status.phase indicates whether the template is validated and available for use:

PhaseDescription
ReadyThe template configuration is valid and ready for cluster allocation.
NotReadyValidation failed (e.g., missing secrets or invalid resource specs).

Status Conditions

ConditionStatusDescription
ReadyTrueAll validation requirements (images, storage, resources) are met.

Detailed Field Reference

Global Spec Fields

FieldTypeRequiredDescription
clusterDeployModestringYesDeployment topology (e.g., txWithInternalLog).
txTxServiceSpecYesConfiguration for the Transaction engine.
logLogServiceSpecYesConfiguration for the Log service.
s3SecretNamestringNoSecret containing AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
serviceAccountNamestringNoKubernetes ServiceAccount with cloud IAM permissions (EBS, S3).

TxServiceSpec (Transaction Engine)

FieldTypeRequiredDescription
moduleModuleSpecYesDefines protocol type (eloqsql, eloqkv, eloqdoc) and port.
replicaint32YesNumber of engine replicas (currently immutable).
imagestringYesContainer image for the engine.
resourcesResourcesNoCPU/Memory requirements.
ephemeralVolumeVolumeYesPerformance storage (e.g., Local SSD) for transaction processing.
storeStorageServiceSpecYesS3 configuration for persistent database data (EloqStore).
transactionTransactionConfigNoFine-grained transaction policies (isolation, protocol).
authenticationbooleanYesWhether to enable database-level authentication.
createAdminbooleanYesWhether the operator should auto-create the admin user.

LogServiceSpec

FieldTypeRequiredDescription
persistentVolumeVolumeYesPersistent storage (e.g., EBS) for the log service.
logGroupint32NoNumber of Raft groups (default: 1).
logReplicaint32NoRaft group replica count (default: 1).
storeStorageServiceSpecYesS3 configuration for persistent log state (RocksDBCloud).
crossZonebooleanNoWhether to enable cross-AZ deployment for high availability.

StorageServiceSpec

FieldTypeRequiredDefaultDescription
storageTypestringYes-Backends: eloqStore or rocksdbCloud.
objectStorageTypestringYess3Cloud provider: s3 or gcs.
rocksdbCloudConfigNo-Configuration for RocksDBCloud (buckets, prefixes, cache).
eloqStoreConfigNo-Configuration for EloqStore (paths, regions, limits).

RocksDBCloudConfig (Log State)

FieldTypeDefaultDescription
bucketNamestring-Cloud bucket name.
objectPathstring-Object path (URI) under the bucket.
regionstring-Cloud provider region (e.g., us-west-1).
endpointUrlstring-Custom S3-compatible endpoint URL (for Minio/self-hosted).

EloqStoreConfig (Database Data)

FieldTypeDefaultDescription
cloudStorePathstring-Cloud store path (bucket/prefix).
cloudRegionstring-Cloud storage region.
localSpaceLimitstring-Local space limit for caching (e.g., 100GB).
dataAppendModebooltrueWhether to use data append mode.

Status Fields

FieldTypeDescription
phasestringTemplate phase. Ready indicates the configuration is validated and usable.
observedGenerationint64The most recent generation observed by the controller.
conditions[]ConditionStandard status conditions.