Update oldName and serverName field descriptions based on code review feedback to avoid confusion about their actual roles: - oldName: Remove misleading "(matches serverName in backup.info)" text. This field represents the Kubernetes cluster resource name, not the Barman server name. - serverName: Provide clearer explanation that it's the S3 path prefix (barmanObjectStore.serverName) used by the original cluster, and should only be set when it differs from the Kubernetes resource name. Updated in: - values.yaml (source of truth for field documentation) - types.go (Go API type comments) - values.schema.json (JSON schema for validation) - postgres.yaml (CRD with embedded OpenAPI schema) Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
266 lines
7.5 KiB
JSON
266 lines
7.5 KiB
JSON
{
|
|
"title": "Chart Values",
|
|
"type": "object",
|
|
"properties": {
|
|
"replicas": {
|
|
"description": "Number of Postgres replicas.",
|
|
"type": "integer",
|
|
"default": 2
|
|
},
|
|
"resources": {
|
|
"description": "Explicit CPU and memory configuration for each PostgreSQL replica. When omitted, the preset defined in `resourcesPreset` is applied.",
|
|
"type": "object",
|
|
"default": {},
|
|
"properties": {
|
|
"cpu": {
|
|
"description": "CPU available to each replica.",
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"memory": {
|
|
"description": "Memory (RAM) available to each replica.",
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"x-kubernetes-int-or-string": true
|
|
}
|
|
}
|
|
},
|
|
"resourcesPreset": {
|
|
"description": "Default sizing preset used when `resources` is omitted.",
|
|
"type": "string",
|
|
"default": "micro",
|
|
"enum": [
|
|
"nano",
|
|
"micro",
|
|
"small",
|
|
"medium",
|
|
"large",
|
|
"xlarge",
|
|
"2xlarge"
|
|
]
|
|
},
|
|
"size": {
|
|
"description": "Persistent Volume Claim size available for application data.",
|
|
"default": "10Gi",
|
|
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"x-kubernetes-int-or-string": true
|
|
},
|
|
"storageClass": {
|
|
"description": "StorageClass used to store the data.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"external": {
|
|
"description": "Enable external access from outside the cluster.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"version": {
|
|
"description": "PostgreSQL major version to deploy",
|
|
"type": "string",
|
|
"default": "v18",
|
|
"enum": [
|
|
"v18",
|
|
"v17",
|
|
"v16",
|
|
"v15",
|
|
"v14",
|
|
"v13"
|
|
]
|
|
},
|
|
"postgresql": {
|
|
"description": "PostgreSQL server configuration.",
|
|
"type": "object",
|
|
"default": {},
|
|
"properties": {
|
|
"parameters": {
|
|
"description": "PostgreSQL server parameters.",
|
|
"type": "object",
|
|
"default": {},
|
|
"properties": {
|
|
"max_connections": {
|
|
"description": "Maximum number of concurrent connections to the database server.",
|
|
"type": "integer",
|
|
"default": 100
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"quorum": {
|
|
"description": "Quorum configuration for synchronous replication.",
|
|
"type": "object",
|
|
"default": {},
|
|
"required": [
|
|
"maxSyncReplicas",
|
|
"minSyncReplicas"
|
|
],
|
|
"properties": {
|
|
"maxSyncReplicas": {
|
|
"description": "Maximum number of synchronous replicas allowed (must be less than total replicas).",
|
|
"type": "integer",
|
|
"default": 0
|
|
},
|
|
"minSyncReplicas": {
|
|
"description": "Minimum number of synchronous replicas required for commit.",
|
|
"type": "integer",
|
|
"default": 0
|
|
}
|
|
}
|
|
},
|
|
"users": {
|
|
"description": "Users configuration map.",
|
|
"type": "object",
|
|
"default": {},
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"description": "Password for the user.",
|
|
"type": "string"
|
|
},
|
|
"replication": {
|
|
"description": "Whether the user has replication privileges.",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"databases": {
|
|
"description": "Databases configuration map.",
|
|
"type": "object",
|
|
"default": {},
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"extensions": {
|
|
"description": "List of enabled PostgreSQL extensions.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"roles": {
|
|
"description": "Roles assigned to users.",
|
|
"type": "object",
|
|
"properties": {
|
|
"admin": {
|
|
"description": "List of users with admin privileges.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"readonly": {
|
|
"description": "List of users with read-only privileges.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"backup": {
|
|
"description": "Backup configuration.",
|
|
"type": "object",
|
|
"default": {},
|
|
"required": [
|
|
"enabled"
|
|
],
|
|
"properties": {
|
|
"destinationPath": {
|
|
"description": "Destination path for backups (e.g. s3://bucket/path/).",
|
|
"type": "string",
|
|
"default": "s3://bucket/path/to/folder/"
|
|
},
|
|
"enabled": {
|
|
"description": "Enable regular backups.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"endpointURL": {
|
|
"description": "S3 endpoint URL for uploads.",
|
|
"type": "string",
|
|
"default": "http://minio-gateway-service:9000"
|
|
},
|
|
"retentionPolicy": {
|
|
"description": "Retention policy (e.g. \"30d\").",
|
|
"type": "string",
|
|
"default": "30d"
|
|
},
|
|
"s3AccessKey": {
|
|
"description": "Access key for S3 authentication.",
|
|
"type": "string",
|
|
"default": "\u003cyour-access-key\u003e"
|
|
},
|
|
"s3SecretKey": {
|
|
"description": "Secret key for S3 authentication.",
|
|
"type": "string",
|
|
"default": "\u003cyour-secret-key\u003e"
|
|
},
|
|
"schedule": {
|
|
"description": "Cron schedule for automated backups.",
|
|
"type": "string",
|
|
"default": "0 2 * * * *"
|
|
}
|
|
}
|
|
},
|
|
"bootstrap": {
|
|
"description": "Bootstrap configuration.",
|
|
"type": "object",
|
|
"default": {},
|
|
"required": [
|
|
"enabled",
|
|
"oldName"
|
|
],
|
|
"properties": {
|
|
"enabled": {
|
|
"description": "Whether to restore from a backup.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"oldName": {
|
|
"description": "Previous cluster name before deletion.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"recoveryTime": {
|
|
"description": "Timestamp (RFC3339) for point-in-time recovery; empty means latest.",
|
|
"type": "string",
|
|
"default": ""
|
|
},
|
|
"serverName": {
|
|
"description": "Barman server name (S3 path prefix) used by the original cluster when writing backups. Set this only when the original cluster had an explicit barmanObjectStore.serverName that differed from its Kubernetes resource name.",
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|