2023-03-08 12:21:48 +00:00
{
"description" : "Backup is the Schema for the backups API" ,
"properties" : {
"apiVersion" : {
2024-03-14 17:07:14 +00:00
"description" : "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" ,
2023-03-08 12:21:48 +00:00
"type" : "string"
} ,
"kind" : {
2024-03-14 17:07:14 +00:00
"description" : "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" ,
2023-03-08 12:21:48 +00:00
"type" : "string"
} ,
"metadata" : {
"type" : "object"
} ,
"spec" : {
2024-03-14 17:07:14 +00:00
"description" : "Specification of the desired behavior of the backup.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" ,
2023-03-08 12:21:48 +00:00
"properties" : {
"cluster" : {
"description" : "The cluster to backup" ,
"properties" : {
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
2023-03-20 10:09:04 +00:00
} ,
2023-10-11 22:08:19 +00:00
"method" : {
"default" : "barmanObjectStore" ,
2024-04-24 23:06:45 +00:00
"description" : "The backup method to be used, possible options are `barmanObjectStore`,\n`volumeSnapshot` or `plugin`. Defaults to: `barmanObjectStore`." ,
2023-10-11 22:08:19 +00:00
"enum" : [
"barmanObjectStore" ,
2024-04-24 23:06:45 +00:00
"volumeSnapshot" ,
"plugin"
2023-10-11 22:08:19 +00:00
] ,
"type" : "string"
} ,
2023-11-03 12:02:43 +00:00
"online" : {
2024-03-14 17:07:14 +00:00
"description" : "Whether the default type of backup with volume snapshots is\nonline/hot (`true`, default) or offline/cold (`false`)\nOverrides the default setting specified in the cluster field '.spec.backup.volumeSnapshot.online'" ,
2023-11-03 12:02:43 +00:00
"type" : "boolean"
} ,
"onlineConfiguration" : {
2024-03-14 17:07:14 +00:00
"description" : "Configuration parameters to control the online/hot backup with volume snapshots\nOverrides the default settings specified in the cluster '.backup.volumeSnapshot.onlineConfiguration' stanza" ,
2023-11-03 12:02:43 +00:00
"properties" : {
"immediateCheckpoint" : {
2024-03-14 17:07:14 +00:00
"description" : "Control whether the I/O workload for the backup initial checkpoint will\nbe limited, according to the `checkpoint_completion_target` setting on\nthe PostgreSQL server. If set to true, an immediate checkpoint will be\nused, meaning PostgreSQL will complete the checkpoint as soon as\npossible. `false` by default." ,
2023-11-03 12:02:43 +00:00
"type" : "boolean"
} ,
"waitForArchive" : {
"default" : true ,
2024-03-14 17:07:14 +00:00
"description" : "If false, the function will return immediately after the backup is completed,\nwithout waiting for WAL to be archived.\nThis behavior is only useful with backup software that independently monitors WAL archiving.\nOtherwise, WAL required to make the backup consistent might be missing and make the backup useless.\nBy default, or when this parameter is true, pg_backup_stop will wait for WAL to be archived when archiving is\nenabled.\nOn a standby, this means that it will wait only when archive_mode = always.\nIf write activity on the primary is low, it may be useful to run pg_switch_wal on the primary in order to trigger\nan immediate segment switch." ,
2023-11-03 12:02:43 +00:00
"type" : "boolean"
}
} ,
"type" : "object" ,
"additionalProperties" : false
} ,
2024-04-24 23:06:45 +00:00
"pluginConfiguration" : {
"description" : "Configuration parameters passed to the plugin managing this backup" ,
"properties" : {
"name" : {
"description" : "Name is the name of the plugin managing this backup" ,
"type" : "string"
} ,
"parameters" : {
"additionalProperties" : {
"type" : "string"
} ,
"description" : "Parameters are the configuration parameters passed to the backup\nplugin for this backup" ,
"type" : "object"
}
} ,
"required" : [
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
} ,
2023-03-20 10:09:04 +00:00
"target" : {
2024-03-14 17:07:14 +00:00
"description" : "The policy to decide which instance should perform this backup. If empty,\nit defaults to `cluster.spec.backup.target`.\nAvailable options are empty string, `primary` and `prefer-standby`.\n`primary` to have backups run always on primary instances,\n`prefer-standby` to have backups run preferably on the most updated\nstandby, if available." ,
2023-03-20 10:09:04 +00:00
"enum" : [
"primary" ,
"prefer-standby"
] ,
"type" : "string"
2023-03-08 12:21:48 +00:00
}
} ,
2023-10-11 21:09:09 +00:00
"required" : [
"cluster"
] ,
2023-03-08 12:21:48 +00:00
"type" : "object" ,
"additionalProperties" : false
} ,
"status" : {
2024-03-14 17:07:14 +00:00
"description" : "Most recently observed status of the backup. This data may not be up to\ndate. Populated by the system. Read-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status" ,
2023-03-08 12:21:48 +00:00
"properties" : {
"azureCredentials" : {
"description" : "The credentials to use to upload data to Azure Blob Storage" ,
"properties" : {
"connectionString" : {
"description" : "The connection string to be used" ,
"properties" : {
"key" : {
"description" : "The key to select" ,
"type" : "string"
} ,
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"key" ,
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
} ,
"inheritFromAzureAD" : {
"description" : "Use the Azure AD based authentication without providing explicitly the keys." ,
"type" : "boolean"
} ,
"storageAccount" : {
"description" : "The storage account where to upload data" ,
"properties" : {
"key" : {
"description" : "The key to select" ,
"type" : "string"
} ,
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"key" ,
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
} ,
"storageKey" : {
2024-03-14 17:07:14 +00:00
"description" : "The storage account key to be used in conjunction\nwith the storage account name" ,
2023-03-08 12:21:48 +00:00
"properties" : {
"key" : {
"description" : "The key to select" ,
"type" : "string"
} ,
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"key" ,
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
} ,
"storageSasToken" : {
2024-03-14 17:07:14 +00:00
"description" : "A shared-access-signature to be used in conjunction with\nthe storage account name" ,
2023-03-08 12:21:48 +00:00
"properties" : {
"key" : {
"description" : "The key to select" ,
"type" : "string"
} ,
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"key" ,
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
}
} ,
"type" : "object" ,
"additionalProperties" : false
} ,
"backupId" : {
"description" : "The ID of the Barman backup" ,
"type" : "string"
} ,
2023-11-03 12:02:43 +00:00
"backupLabelFile" : {
"description" : "Backup label file content as returned by Postgres in case of online (hot) backups" ,
"format" : "byte" ,
"type" : "string"
} ,
2023-03-20 10:09:04 +00:00
"backupName" : {
"description" : "The Name of the Barman backup" ,
"type" : "string"
} ,
2023-03-08 12:21:48 +00:00
"beginLSN" : {
"description" : "The starting xlog" ,
"type" : "string"
} ,
"beginWal" : {
"description" : "The starting WAL" ,
"type" : "string"
} ,
"commandError" : {
"description" : "The backup command output in case of error" ,
"type" : "string"
} ,
"commandOutput" : {
"description" : "Unused. Retained for compatibility with old versions." ,
"type" : "string"
} ,
"destinationPath" : {
2024-03-14 17:07:14 +00:00
"description" : "The path where to store the backup (i.e. s3://bucket/path/to/folder)\nthis path, with different destination folders, will be used for WALs\nand for data. This may not be populated in case of errors." ,
2023-03-08 12:21:48 +00:00
"type" : "string"
} ,
"encryption" : {
"description" : "Encryption method required to S3 API" ,
"type" : "string"
} ,
"endLSN" : {
"description" : "The ending xlog" ,
"type" : "string"
} ,
"endWal" : {
"description" : "The ending WAL" ,
"type" : "string"
} ,
"endpointCA" : {
2024-03-14 17:07:14 +00:00
"description" : "EndpointCA store the CA bundle of the barman endpoint.\nUseful when using self-signed certificates to avoid\nerrors with certificate issuer and barman-cloud-wal-archive." ,
2023-03-08 12:21:48 +00:00
"properties" : {
"key" : {
"description" : "The key to select" ,
"type" : "string"
} ,
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"key" ,
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
} ,
"endpointURL" : {
2024-03-14 17:07:14 +00:00
"description" : "Endpoint to be used to upload data to the cloud,\noverriding the automatic endpoint discovery" ,
2023-03-08 12:21:48 +00:00
"type" : "string"
} ,
"error" : {
"description" : "The detected error" ,
"type" : "string"
} ,
"googleCredentials" : {
"description" : "The credentials to use to upload data to Google Cloud Storage" ,
"properties" : {
"applicationCredentials" : {
"description" : "The secret containing the Google Cloud Storage JSON file with the credentials" ,
"properties" : {
"key" : {
"description" : "The key to select" ,
"type" : "string"
} ,
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"key" ,
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
} ,
"gkeEnvironment" : {
2024-03-14 17:07:14 +00:00
"description" : "If set to true, will presume that it's running inside a GKE environment,\ndefault to false." ,
2023-03-08 12:21:48 +00:00
"type" : "boolean"
}
} ,
"type" : "object" ,
"additionalProperties" : false
} ,
"instanceID" : {
"description" : "Information to identify the instance where the backup has been taken from" ,
"properties" : {
"ContainerID" : {
"description" : "The container ID" ,
"type" : "string"
} ,
"podName" : {
"description" : "The pod name" ,
"type" : "string"
}
} ,
"type" : "object" ,
"additionalProperties" : false
} ,
2023-10-11 22:08:19 +00:00
"method" : {
"description" : "The backup method being used" ,
"type" : "string"
} ,
2023-11-03 12:02:43 +00:00
"online" : {
"description" : "Whether the backup was online/hot (`true`) or offline/cold (`false`)" ,
"type" : "boolean"
} ,
2023-03-08 12:21:48 +00:00
"phase" : {
"description" : "The last backup status" ,
"type" : "string"
} ,
"s3Credentials" : {
"description" : "The credentials to use to upload data to S3" ,
"properties" : {
"accessKeyId" : {
"description" : "The reference to the access key id" ,
"properties" : {
"key" : {
"description" : "The key to select" ,
"type" : "string"
} ,
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"key" ,
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
} ,
"inheritFromIAMRole" : {
"description" : "Use the role based authentication without providing explicitly the keys." ,
"type" : "boolean"
} ,
"region" : {
"description" : "The reference to the secret containing the region name" ,
"properties" : {
"key" : {
"description" : "The key to select" ,
"type" : "string"
} ,
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"key" ,
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
} ,
"secretAccessKey" : {
"description" : "The reference to the secret access key" ,
"properties" : {
"key" : {
"description" : "The key to select" ,
"type" : "string"
} ,
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"key" ,
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
} ,
"sessionToken" : {
"description" : "The references to the session key" ,
"properties" : {
"key" : {
"description" : "The key to select" ,
"type" : "string"
} ,
"name" : {
"description" : "Name of the referent." ,
"type" : "string"
}
} ,
"required" : [
"key" ,
"name"
] ,
"type" : "object" ,
"additionalProperties" : false
}
} ,
"type" : "object" ,
"additionalProperties" : false
} ,
"serverName" : {
2024-03-14 17:07:14 +00:00
"description" : "The server name on S3, the cluster name is used if this\nparameter is omitted" ,
2023-03-08 12:21:48 +00:00
"type" : "string"
} ,
2023-10-11 22:08:19 +00:00
"snapshotBackupStatus" : {
"description" : "Status of the volumeSnapshot backup" ,
"properties" : {
"elements" : {
"description" : "The elements list, populated with the gathered volume snapshots" ,
"items" : {
"description" : "BackupSnapshotElementStatus is a volume snapshot that is part of a volume snapshot method backup" ,
"properties" : {
"name" : {
"description" : "Name is the snapshot resource name" ,
"type" : "string"
} ,
2023-12-21 13:33:03 +00:00
"tablespaceName" : {
2024-03-14 17:07:14 +00:00
"description" : "TablespaceName is the name of the snapshotted tablespace. Only set\nwhen type is PG_TABLESPACE" ,
2023-12-21 13:33:03 +00:00
"type" : "string"
} ,
2023-10-11 22:08:19 +00:00
"type" : {
2023-12-21 13:33:03 +00:00
"description" : "Type is tho role of the snapshot in the cluster, such as PG_DATA, PG_WAL and PG_TABLESPACE" ,
2023-10-11 22:08:19 +00:00
"type" : "string"
}
} ,
"required" : [
"name" ,
"type"
] ,
"type" : "object" ,
"additionalProperties" : false
} ,
"type" : "array"
}
} ,
"type" : "object" ,
"additionalProperties" : false
} ,
2023-03-08 12:21:48 +00:00
"startedAt" : {
"description" : "When the backup was started" ,
"format" : "date-time" ,
"type" : "string"
} ,
"stoppedAt" : {
"description" : "When the backup was terminated" ,
"format" : "date-time" ,
"type" : "string"
2023-11-03 12:02:43 +00:00
} ,
"tablespaceMapFile" : {
"description" : "Tablespace map file content as returned by Postgres in case of online (hot) backups" ,
"format" : "byte" ,
"type" : "string"
2023-03-08 12:21:48 +00:00
}
} ,
"type" : "object" ,
"additionalProperties" : false
}
} ,
2023-10-11 21:09:09 +00:00
"required" : [
"metadata" ,
"spec"
] ,
2023-03-08 12:21:48 +00:00
"type" : "object"
}