Supported Resource Types
The Operator supports the following resource types (known as Kind's):
- KurrentDB
- KurrentDBBackup
- KurrentDBBackupSchedule
KurrentDB
This resource type is used to define a database deployment.
API
KurrentDBSpec
| Field | Required | Description | 
|---|---|---|
| replicasinteger | Yes | Number of nodes in a database cluster. May be 1, 3, or, for standalone ReadOnly-Replicas, it may be 0. | 
| imagestring | Yes | KurrentDB container image URL | 
| resourcesResourceRequirements | No | Database container resource limits and requests | 
| storagePersistentVolumeClaim | Yes | Persistent volume claim settings for the underlying data volume | 
| networkKurrentDBNetwork | Yes | Defines the network configuration to use with the database | 
| configurationyaml | No | Additional configuration to use with the database, see below | 
| sourceBackupstring | No | Backup name to restore a cluster from | 
| securityKurrentDBSecurity | No | Security configuration to use for the database. This is optional, if not specified the cluster will be created without security enabled. | 
| licenseSecretSecretKeySelector | No | A secret that contains the Enterprise license for the database | 
| constraintsKurrentDBConstraints | No | Scheduling constraints for the Kurrent DB pod. | 
| readOnlyRepliasKurrentDBReadOnlyReplicasSpec | No | Read-only replica configuration the Kurrent DB Cluster. | 
| extraMetadataKurrentDBExtraMetadataSpec | No | Additional annotations and labels for child resources. | 
| quorumNodesstring array | No | A list of endpoints (in host:port notation) to reach the quorum nodes when .Replicas is zero, see standalone ReadOnlyReplicas | 
KurrentDBReadOnlyReplicasSpec
Other than replicas, each of the fields in KurrentDBReadOnlyReplicasSpec default to the corresponding values from the main KurrentDBSpec.
| Field | Required | Description | 
|---|---|---|
| replicasinteger | No | Number of read-only replicas in the cluster. Defaults to zero. | 
| resourcesResourceRequirements | No | Database container resource limits and requests. | 
| storagePersistentVolumeClaim | No | Persistent volume claim settings for the underlying data volume. | 
| configurationyaml | No | Additional configuration to use with the database. | 
| constraintsKurrentDBConstraints | No | Scheduling constraints for the Kurrent DB pod. | 
KurrentDBConstraints
| Field | Required | Description | 
|---|---|---|
| nodeSelectoryaml | No | Identifies nodes that the Kurrent DB may consider during scheduling. | 
| affinityAffinity | No | The node affinity, pod affinity, and pod anti-affinity for scheduling the Kurrent DB pod. | 
| tolerationslist of Toleration | No | The tolerations for scheduling the Kurrent DB pod. | 
| topologySpreadConstraintslist of TopologySpreadConstraint | No | The topology spread constraints for scheduling the Kurrent DB pod. | 
KurrentDBExtraMetadataSpec
| Field | Required | Description | 
|---|---|---|
| allExtraMetadataSpec | No | Extra annotations and labels for all child resource types. | 
| configMapsExtraMetadataSpec | No | Extra annotations and labels for ConfigMaps. | 
| statefulSetsExtraMetadataSpec | No | Extra annotations and labels for StatefulSets. | 
| podsExtraMetadataSpec | No | Extra annotations and labels for Pods. | 
| persistentVolumeClaimsExtraMetadataSpec | No | Extra annotations and labels for PersistentVolumeClaims. | 
| headlessServicesExtraMetadataSpec | No | Extra annotations and labels for the per-cluster headless Services. | 
| headlessPodServicesExtraMetadataSpec | No | Extra annotations and labels for the per-pod headless Services. | 
| loadBalancersExtraMetadataSpec | No | Extra annotations and labels for LoadBalancer-type Services. | 
Note that select kinds of extra metadata support template expansion to allow multiple instances of a child resource to be distinguished from one another. In particular, ConfigMaps, StatefulSets, and HeadlessServices support "per-node-kind" template expansions:
- {name}expands to KurrentDB.metadata.name
- {namespace}expands to KurretnDB.metadata.namespace
- {domain}expands to the KurrnetDBNetwork.domain
- {nodeTypeSuffix}expands to- ""for a primary node or- "-replica"for a replica node
Additionally, HeadlessPodServices and LoadBalancers support "per-pod" template expansions:
- {name}expands to KurrentDB.metadata.name
- {namespace}expands to KurretnDB.metadata.namespace
- {domain}expands to the KurrnetDBNetwork.domain
- {nodeTypeSuffix}expands to- ""for a primary node or- "-replica"for a replica node
- {podName}expands to the name of the pod corresponding to the resource
- {podOrdinal}the ordinal assigned to the pod corresponding to the resource
Notably, Pods and PersistentVolumeClaims do not support any template expansions, due to how StatefulSets work.
ExtraMetadataSpec
| Field | Required | Description | 
|---|---|---|
| labelsobject | No | Extra labels for a resource. | 
| annotationsobject | No | Extra annotations for a resource. | 
KurrentDBNetwork
| Field | Required | Description | 
|---|---|---|
| domainstring | Yes | Domain used for external DNS e.g. advertised address exposed in the gossip state | 
| loadBalancerKurrentDBLoadBalancer | Yes | Defines a load balancer to use with the database | 
| fqdnTemplatestring | No | The template string used to define the external advertised address of a node | 
| internodeTrafficStrategystring | No | How servers dial each other. One of "ServiceName"(default),"FQDN", or"SplitDNS". See details. | 
| clientTrafficStrategystring | No | How clients dial servers. One of "ServiceName"or"FQDN"(default). See details. | 
| splitDNSExtraRuleslist of DNSRule | No | Advanced configuration for when internodeTrafficStrategyis set to"SplitDNS". | 
Note that fqdnTemplate supports the following expansions:
- {name}expands to KurrentDB.metadata.name
- {namespace}expands to KurretnDB.metadata.namespace
- {domain}expands to the KurrnetDBNetwork.domain
- {nodeTypeSuffix}expands to- ""for a primary node or- "-replica"for a replica node
- {podName}expands to the name of the pod
When fqdnTemplate is empty, it defaults to {podName}.{name}{nodeTypeSuffix}.{domain}.
DNSRule
| Field | Required | Description | 
|---|---|---|
| hoststring | Yes | A host name that should be intercepted. | 
| resultstring | Yes | An IP address to return, or another hostname to look up for the final IP address. | 
| regexboolean | No | Whether hostandresultshould be treated as regex patterns. Defaults tofalse. | 
Note that when regex is true, the regex support is provided by the go standard regex library, and referencing captured groups differs from some other regex implementations. For example, to redirect lookups matching the pattern
    <podname>.my-db.my-namespace.svc.cluster.local
to
    <podname>.my-domain.com
you could use the following dns rule:
host: ([a-z0-9-]*)\.my-db\.my-namespace\.svc\.cluster\.local
result: ${1}.my-domain.com
regex: trueKurrentDBLoadBalancer
| Field | Required | Description | 
|---|---|---|
| enabledboolean | Yes | Determines if a load balancer should be deployed for each node | 
| allowedIpsstring array | No | List of IP ranges allowed by the load balancer (default will allow all access) | 
KurrentDBSecurity
| Field | Required | Description | 
|---|---|---|
| certificateReservedNodeCommonNamestring | No | Common name for the TLS certificate (this maps directly to the database property CertificateReservedNodeCommonName) | 
| certificateAuthoritySecretCertificateSecret | No | Secret containing the CA TLS certificate. | 
| certificateSecretCertificateSecret | Yes | Secret containing the TLS certificate to use. | 
| certificateSubjectNamestring | No | Deprecated field. The value of this field is always ignored. | 
CertificateSecret
| Field | Required | Description | 
|---|---|---|
| namestring | Yes | Name of the secret holding the certificate details | 
| keyNamestring | Yes | Key within the secret containing the TLS certificate | 
| privateKeyNamestring | No | Key within the secret containing the TLS certificate private key | 
KurrentDBBackup
This resource type is used to define a backup for an existing database deployment.
Important
Resources of this type must be created within the same namespace as the target database cluster to backup.
API
KurrentDBBackupSpec
| Field | Required | Description | 
|---|---|---|
| clusterNamestring | Yes | Name of the source database cluster | 
| nodeNamestring | No | Specific node name within the database cluster to use as the backup. If unspecified, the leader is used. | 
| volumeSnapshotClassNamestring | Yes | The name of the underlying volume snapshot class to use. | 
| extraMetadataKurrentDBBackupExtraMetadataSpec | No | Additional annotations and labels for child resources. | 
| ttlstring | No | A time-to-live for this backup. If unspecified, the TTL is treated as infinite. | 
The format of the ttl may be in years (y), weeks (w), days (d), hours (h), or seconds (s), or a combination like 1d12h
KurrentDBBackupExtraMetadataSpec
| Field | Required | Description | 
|---|---|---|
| All ExtraMetadataSpec | No | Extra annotations and labels for all child resource types (currently only VolumeSnapshots). | 
| VolumeSnapshots ExtraMetadataSpec | No | Extra annotations and labels for VolumeSnapshots. | 
KurrentDBBackupSchedule
This resource type is used to define a schedule for creating database backups and retention policies.
KurrentDBBackupScheduleSpec
| Field | Required | Description | 
|---|---|---|
| schedulestring | Yes | A CronJob-style schedule. See Writing a CronJob Spec. | 
| timeZonestring | No | A timezone specification. Defaults to Etc/UTC. | 
| templateKurrentDBBackup | Yes | A KurrentDBBackuptemplate. | 
| keepinteger | No | The maximum of complete backups this schedule will accumulate before it prunes the oldes ones. If unset, there is no limit. | 
| suspendboolean | No | 
Note that the only metadata allowed in template.metadata is name, labels, and annotations. If name is provided, it will be extended with an index like my-name-1 when creating backups, otherwise created backups will be based on the name of the schedule resource.
Configuring Kurrent DB
The KurrentDB.spec.configuration yaml field may contain any valid configuration values for Kurrent DB. However, some values may be unnecessary, as the Operator provides some defaults, while other values may be ignored, as the Operator may override them.
The Operator-defined default configuration values, which may be overridden by the user's KurrentDB.spec.configuration are:
| Default Field | Default Value | 
|---|---|
| DisableLogFile | true | 
| EnableAtomPubOverHTTP | true | 
| Insecure | false | 
| PrepareTimeoutMs | 3000 | 
| CommitTimeoutMs | 3000 | 
| GossipIntervalMs | 2000 | 
| GossipTimeoutMs | 5000 | 
| LeaderElectionTimeoutMs | 2000 | 
| ReplicationHeartbeatInterval | 1000 | 
| ReplicationHeartbeatTimeout | 2500 | 
| NodeHeartbeatInterval | 1000 | 
| NodeHeartbeatTimeout | 2500 | 
The Operator-managed configuration values, which take precedence over the user's KurrentDB.spec.configuration, are:
| Managed Field | Value | 
|---|---|
| Db | hard-coded volume mount point | 
| Index | hard-coded volume mount point | 
| Log | hard-coded volume mount point | 
| Insecure | true if KurrentDB.spec.security.certificateSecretis empty | 
| DiscoverViaDns | false ( GossipSeedis used instead) | 
| AllowAnonymousEndpointAccess | true | 
| AllowUnknownOptions | true | 
| NodeIp | 0.0.0.0 (to accept traffic from outside pod) | 
| ReplicationIp | 0.0.0.0 (to accept traffic from outside pod) | 
| NodeHostAdvertiseAs | Derived from pod name | 
| ReplicationHostAdvertiseAs | Derived from pod name | 
| AdveritseHostToClientAs | Derived from KurrentDB.spec.newtork.fqdnTemplate | 
| ClusterSize | Derived from KurrentDB.spec.replicas | 
| GossipSeed | Derived from pod list | 
| ReadOnlyReplica | Automatically set for ReadOnlyReplica pods |