DatabaseServerPreset¶
DatabaseServerPreset is a cluster-scoped baseline configuration for DatabaseServer resources. You create it, or another tool creates it for you.
A preset holds one PostgreSQL shape: instance count, resources, storage, scheduling, monitoring, and the archive bucket. A platform team can publish a set of presets, for example small, standard, and large, and each team picks one. The PostgreSQL major version is not part of the shape. It comes from a CamundaRelease, so a version change never edits a preset.
A preset creates nothing and reports no status. A DatabaseServer uses it through spec.presetRef.
The smallest preset sets an instance count and a volume size:
apiVersion: core.camunda.io/v1
kind: DatabaseServerPreset
metadata:
name: standard
spec:
server:
instances: 2
storageSize: "64Gi"
graph LR
DBS[DatabaseServer] -.->|presetRef| DBSP[DatabaseServerPreset]
DBS -.->|releaseRef| CR[CamundaRelease]
Merge rules¶
spec.server of the preset is the baseline. The CamundaRelease of releaseRef merges over it, and the server spec merges over both. The release supplies the version only. A field set on the DatabaseServer replaces the value of the layer below for that field. A field left unset on the server comes from the layer below. Each field merges as the table says.
| Field | Merge behavior |
|---|---|
platformConfigRef, instances, storageSize, storageClassName, walStorageSize |
The server value replaces the preset value. An unset server field inherits the preset value. |
resources, serviceAccount, scheduling, monitoring, archive |
Replaced as a whole block, never merged field by field. A server that sets its own archive block drops the bucket and the retention of the preset with it. |
podLabels, podAnnotations |
Replaced as a whole map, never merged key by key. A server that sets one pod label drops every pod label of the preset. An empty map (podLabels: {}, podAnnotations: {}) counts as unset and keeps the preset value. |
presetRef, releaseRef, databaseServerConfig, suspend |
Instance-bound. They always come from the server and are rejected in a preset. |
version |
Not part of a preset. It comes from spec.databaseServer.version of the release, and a server value replaces it. A preset that sets it is rejected. |
To remove a map that the preset sets, set the map that you want on the server. Or reference a preset without that map.
Fleet settings¶
A preset can set archive and platformConfigRef. One bucket then serves every server that references the preset, because each server writes its archive under a prefix of its own. One image repository serves them all as well.
Changes¶
An edit of a preset reaches every DatabaseServer that references it, with these exceptions:
- A lower
storageSizeorwalStorageSizedoes not shrink a running server. The server keeps its size and records a Warning event with reasonStorageShrinkIgnored. - A cleared
walStorageSizedoes not remove the write-ahead log volume of a running server. The server keeps the volume and records a Warning event with reasonWALStorageKept. - An edit of
archivewaits while a server that uses the preset runs a rollback. That server reportsReadyFalsewith reasonInvalidReferenceuntil the rollback is answered.
A new server uses the new baseline.
Deletion¶
Deleting a preset removes no server. Each DatabaseServer that references it reports Ready False with reason InvalidReference.
Status¶
A preset has no status. It reports no conditions and no status.observedGeneration. A problem with a preset shows on the Ready condition of the DatabaseServer that references it. Examples are a presetRef that names no preset, or a merge that lacks version or storageSize.
Fields¶
The API reference lists every field of DatabaseServerPreset, with its type, whether it is required, its default, and its validation.
spec.server has the same type as the spec of DatabaseServer. The fields presetRef, releaseRef, databaseServerConfig, and suspend belong to one server and must stay unset in a preset. Validation rules has the rule for version. Every other field is inheritable.
Validation rules¶
spec.servermust not setpresetRef,releaseRef,databaseServerConfig, orsuspend. An emptypresetRef, an emptyreleaseRef, andsuspend: falsecount as unset, so templated YAML that renders zero values still applies. An emptydatabaseServerConfigis rejected by the name pattern. Omit the field instead.versionis rejected inspec.serverwithversion belongs to a CamundaRelease and must not be set in a preset. Move the version to a CamundaRelease, and point every server at it withreleaseRef. An emptyversionis rejected by the bare-major pattern. Omit the field instead.- The no-shrink rule of
DatabaseServerforstorageSizeandwalStorageSizedoes not bind a preset. You can lower or clear them at any time. See Changes for the effect on a running server. - The
DatabaseServerchecks that the merged configuration is complete, not the preset. - Every other rule of the
DatabaseServerschema applies tospec.server.instancesmust be at least 1, andarchive.retentionPeriodDaysmust be from 1 to 36500.archive.baseBackupSchedulemust be a six-field cron or a descriptor, as on the DatabaseServer.
A production-shaped example¶
apiVersion: core.camunda.io/v1
kind: DatabaseServerPreset
metadata:
name: large
spec:
server:
platformConfigRef: my-platform-config
instances: 3
resources:
requests: { cpu: "4", memory: "8Gi" }
limits: { memory: "8Gi" }
storageSize: "512Gi"
storageClassName: "ssd"
walStorageSize: "64Gi"
scheduling:
tolerations:
- key: dedicated
operator: Equal
value: postgres
effect: NoSchedule
monitoring:
podMonitor:
enabled: true
labels:
release: prometheus
archive:
objectStorageRef: my-backup-bucket
retentionPeriodDays: 30
Related¶
- DatabaseServer: references a preset through
spec.presetRefand inheritsspec.server. - CamundaRelease: the PostgreSQL version that runs on this shape. It merges between the preset and the server.
- ObjectStorageConfig: the archive bucket that
spec.server.archive.objectStorageRefnames. - CamundaPlatformConfig: the image settings that
spec.server.platformConfigRefnames. - Secondary storage guide: how to choose and connect secondary storage.