Custom Resource Definitions

Please be aware that the Operator is currently considered as a preview release, and therefore it should not be used in a production environment.

This section describes the Event Store specific Custom Resource Definitions (CRDs). For more information refer to the Kubernetes documentation.

Kind / EventStoreDB

The EventStoreDB resource defines an ESDB cluster. An example of this resource type is shown below which defines:

  • a three node cluster called esdb-cluster

  • the ESDB version of 23.10.1-jammy

  • the resource limits for each node

  • TLS using self-signed certificates

  • no external ingress

apiVersion: database.eventstore.com/v1alpha1
kind: EventStoreDB
metadata:
  name: esdb-cluster
  namespace: esdb
spec:
  replicas: 3
  image: eventstore/eventstore:23.10.1-jammy
  resources:
    limits:
      cpu: "0.2"
      memory: 500Mi
    requests:
      cpu: "0.2"
      memory: 500Mi
  storage:
    volumeMode: "Filesystem"
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 5Gi
  dnsZone: esdb-cluster.esdb.svc.cluster.local
  certificateSecret: esdb-cluster-tls
  local: true
  config:
    insecure: false
    certificateReservedNodeCommonName: "eventstoredb-node"

The kubectl tool can be used to view ESDB resources as follows:

kubectl -n {namespace} get eventstoredbs                (1)
kubectl -n {namespace} describe eventstoredb {name}     (1) (2)
kubectl -n {namespace} get eventstoredb {name} -o yaml  (1) (2)
1 Replace {namespace} with the appropriate value.
2 Replace {name} with the ESDB resource name.

Kind / EventStoreDBBackup

The EventStoreDBBackup resource defines how an existing ESDB cluster should be backed up. An example of this resource type is shown below which defines:

  • the target cluster esdb-cluster that will be backed up

  • the underlying volume snapshot class to use

apiVersion: database.eventstore.com/v1alpha1
kind: EventStoreDBBackup
metadata:
  name: esdb-cluster-backup
spec:
  clusterId: esdb-cluster
  volumeSnapshotClassName: esdb-backups

The kubectl tool can be used to view ESDB Backup resources as follows:

kubectl -n {namespace} get eventstoredbbackups          (1)
kubectl -n {namespace} describe eventstoredb {name}     (1) (2)
kubectl -n {namespace} get eventstoredb {name} -o yaml  (1) (2)
1 Replace {namespace} with the appropriate value.
2 Replace {name} with the ESDB resource name.

API

EventStoreDB

Field

Description

apiVersion string

database.eventstore.com/v1alpha1

kind string

EventStoreDB

apiVersion string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More Info.

metadata ObjectMeta

Refer to the Kubernetes API documentation for fields of metadata.

spec EventStoreDBSpec

status EventStoreDBStatus

EventStoreDBSpec

Defines the desired state of EventStoreDB

Field

Description

replicas integer

Number of nodes in a cluster.

image string

ESDB container image.

resources ResourceRequirements

Database container resource limits and requests.

storage PersistentVolumeClaimSpec

ESDB persistent volume claim spec for the data disk.

dnsZone string

Domain for DNS zone. Provides a way to create clusters in different hosted zones, e.g. per-cloud/per-region.

local boolean

When enabled, does not expose ESDB to the public internet via a Load Balancer and allows self-signed certificates to be used.

config EventStoreDBConfig

ESDB configuration.

certificateSecret string

Name of the secret with certificates.

allowedIPs string array

List of IP ranges to allow access to the load balancer.

sourceBackup string

Backup name to restore a cluster from.

EventStoreDBStatus

Defines the observed state of EventStoreDB.

Field

Description

gossipEndpoints string array

List of comma separated gossip endpoints of an ESDB cluster.

restoredFrom string

Name of a source backup.

error string

Error message of the last reconcile loop.

EventStoreDBConfig

Field

Description

insecure boolean

When enabled, creates an insecure cluster.

certificateReservedNodeCommonName string

Certificate Common Name.

EventStoreDBBackup

Field

Description

apiVersion string

database.eventstore.com/v1alpha1

kind string

EventStoreDBBackup

apiVersion string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More Info.

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

spec EventStoreDBBackupSpec

status EventStoreDBBackupStatus

EventStoreDBBackupSpec

Field

Description

clusterId string

Backup cluster id.

nodeId integer

The node index for a backup to be created. If not set, the backup will be created from the leader node.

volumeSnapshotClassName string

Name of the VolumeSnapshotClass.

EventStoreDBBackupStatus

Field

Description

nodeId integer

Backup node id.

ready boolean

Represents the status of a snapshot.

message string

Backup status message.

creationTime Time

Backup create time.

isLeader boolean

Shows if source node was a leader when backup was created.