Cennso PostgreSQL Backup Custom Resource Definition
You can use the Cennso PostgreSQL Backup Custom Resource (CR) to create and manage PostgreSQL instance backups. The Cennso PostgreSQL Backup CR is defined by a Custom Resource Definition (CRD)Opens in a new tab. This document covers all configuration parameters defined in the CRD.
For more information on how to manage backups using the Cennso PostgreSQL Backup, see Cennso PostgreSQL Backup and Back up and restore Cennso PostgreSQL documents.
Configuration parameters
These are all parameters that you can use to configure the Cennso PostgreSQL Backup CR:
- PostgreSQLBackupKind
- db.contrib.cennso.comGroup
- v1alpha1Version
- apiVersion:
- db.contrib.cennso.com/v1alpha1
- kind:
- PostgreSQLBackup
- plural:
- postgresqlbackups
- categories:
- [composite]
apiVersionstringrequiredConstant"db.contrib.cennso.com/v1alpha1"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More information: Kubernetes API conventionsOpens in a new tab.kindstringrequiredConstant"PostgreSQLBackup"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More information: Kubernetes API conventionsOpens in a new tab.metadataobjectrequiredStandard object metadata. More information: ObjectMetaOpens in a new tab.specobjectrequiredcredentialsSecretRefobjectrequiredReference to a Kubernetes secret holding credential-related environment variables for the backup jobnamespacestringrequiredKubernetes namespace of the target Cennso PostgreSQL Instance. The backup CronJob runs in this namespace and finds a read replica pod here using a label selector, so it must match spec.namespace of the target
PostgreSQLInstance. With a wrong namespace, the backup never runs. If the namespace does not exist, thePostgreSQLBackupstays not Ready because its ServiceAccount and Role cannot be created. If the namespace exists but holds no such instance, the backup job fails with the error"ERROR: No ready read replica found. Backup can be performed only on a read replica."resticRepositorystringrequiredURI of the Restic repository that stores the database backups. For example:
"s3:http://minio:9000/postgresql-backup".schedulestringrequiredA cron expression defining when the backup job should run. For example:
"0 12 * * *". For more information, see the official documentationOpens in a new tab.activeDeadlineSecondsinteger>= 1Maximum time in seconds a single backup run may take before Kubernetes terminates it and marks the Job as failed. For more information, see the official documentationOpens in a new tab.
additionalResticOptsobjectOptional Restic-specific command overrides for caching, pruning, and extra argumentsx-kubernetes-validationsbackoffLimitinteger>= 0Number of times a failed backup run is retried before the Job is marked as failed. For more information, see the official documentationOpens in a new tab.
connectionSecretRefobjectA reference to the Kubernetes secret that contains a valid kubeconfig to the target Core Cluster. When not set, the Cennso PostgreSQL Operator is deployed on the Management Cluster.crossplaneobjectConfigures how Crossplane will reconcile this composite resourcefailedJobsHistoryLimitinteger>= 0Number of failed backup Jobs to retain so their logs can be inspected. For more information, see the official documentationOpens in a new tab.
imageobjectConfiguration of the image used by the backup jobimagePullSecretRefobjectA reference to the Kubernetes secret that contains credentials to pull the image for the backup jobmaxReplicationLagBytesinteger>= 0Maximum amount of WAL, in bytes, that the read replica can receive without replaying when the backup starts. If the replica lags behind by more than this amount, the backup is skipped and the job fails.pgBasebackupExtraArgsstringExtra command-line options for the
pg_basebackuputility. Arguments are split on whitespace, so an individual argument value cannot contain spaces (for example,--label="a b"is not treated as a single argument).replicationSecretNamestringName of the Kubernetes secret with the client certificate of the replication user. If the target
PostgreSQLInstanceuses custom TLS certificate for replication specified by spec.replicationTLSSecretName, this field must have the same value. Otherwise, the backup job uses the certificate generated by the operator.resourcesobjectResources for the backup servicestorageobjectA volume that holds the local copy of the backup before it is uploaded to the Restic repository. The backup job requests an ephemeral PersistentVolumeClaim of this capacity and class, which is deleted with the job pod. If omitted, the local copy is written to the ephemeral storage of the node that runs the job pod, which must have capacity for a full copy of the database.successfulJobsHistoryLimitinteger>= 0Number of successfully completed backup Jobs to retain
statusobjectconditionsobject[]Conditions of the resource.x-kubernetes-list-map-keysx-kubernetes-list-type