49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
|
|
let _presets = (import "schemas/lib/concerns_presets.ncl").presets in
|
||
|
|
|
||
|
|
{
|
||
|
|
postgresql | default = {
|
||
|
|
name | default = "postgresql",
|
||
|
|
version | default = "18",
|
||
|
|
port | default = 5432,
|
||
|
|
mode | default = 'cluster,
|
||
|
|
data_dir | default = "/var/lib/data/postgresql",
|
||
|
|
databases | default = [],
|
||
|
|
image | default = "postgres:18-bookworm",
|
||
|
|
|
||
|
|
requires | default = {
|
||
|
|
storage = { size = "10Gi", persistent = true },
|
||
|
|
ports = [{ port = 5432, exposure = 'private }],
|
||
|
|
credentials = ["POSTGRES_PASSWORD"],
|
||
|
|
},
|
||
|
|
|
||
|
|
provides | default = {
|
||
|
|
service = "postgresql",
|
||
|
|
port = 5432,
|
||
|
|
databases = [],
|
||
|
|
},
|
||
|
|
|
||
|
|
operations | default = {
|
||
|
|
install = true,
|
||
|
|
update = true,
|
||
|
|
delete = true,
|
||
|
|
backup = true,
|
||
|
|
restore = true,
|
||
|
|
health = true,
|
||
|
|
config = true,
|
||
|
|
},
|
||
|
|
live_check | default = {
|
||
|
|
strategy = 'k8s_pods,
|
||
|
|
scope = 'cp_only,
|
||
|
|
},
|
||
|
|
|
||
|
|
# ServiceConcerns default — PostgreSQL; database preset with custom backlog_ref.
|
||
|
|
concerns | default = _presets.database & {
|
||
|
|
backup | force = {
|
||
|
|
kind = 'pending,
|
||
|
|
reason = "BackupPolicy with database scope + dump_strategy declared at workspace level",
|
||
|
|
backlog_ref = "BACKUP-DB-POSTGRES-001",
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
}
|