diff --git a/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml b/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml index e98fb370db..9db0371425 100644 --- a/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml +++ b/config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml @@ -1422,6 +1422,7 @@ spec: required: - name type: object + minItems: 1 type: array x-kubernetes-list-map-keys: - name @@ -2219,6 +2220,8 @@ spec: - enabled - repoName type: object + required: + - repos type: object required: - pgbackrest diff --git a/docs/content/references/crd.md b/docs/content/references/crd.md index 19e7ef0c49..732a471cf7 100644 --- a/docs/content/references/crd.md +++ b/docs/content/references/crd.md @@ -3761,16 +3761,16 @@ pgBackRest archive configuration object Defines configuration for a pgBackRest dedicated repository host. This section is only applicable if at least one "volume" (i.e. PVC-based) repository is defined in the "repos" section, therefore enabling a dedicated repository host Deployment. false - - repos - []object - Defines a pgBackRest repository - false restore object Defines details for performing an in-place restore using pgBackRest false + + repos + []object + Defines a pgBackRest repository + true @@ -5370,14 +5370,14 @@ The pod this Toleration is attached to tolerates any taint that matches the trip -

- PostgresCluster.spec.backups.pgbackrest.repos[index] +

+ PostgresCluster.spec.backups.pgbackrest.restore ↩ Parent

-PGBackRestRepo represents a pgBackRest repository. Only one of its members may be specified. +Defines details for performing an in-place restore using pgBackRest @@ -5389,47 +5389,57 @@ PGBackRestRepo represents a pgBackRest repository. Only one of its members may - + - + - - - + + + - - - + + + - - - + + + - + - + - + + + + + + + + + + + - +
azureaffinity objectRepresents a pgBackRest repository that is created using Azure storageScheduling constraints of the pgBackRest restore Job. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node false
gcsobjectRepresents a pgBackRest repository that is created using Google Cloud StorageclusterNamestringThe name of an existing PostgresCluster to use as the data source for the new PostgresCluster. Defaults to the name of the PostgresCluster being created if not provided. false
s3objectRepoS3 represents a pgBackRest repository that is created using AWS S3 (or S3-compatible) storageclusterNamespacestringThe namespace of the cluster specified as the data source using the clusterName field. Defaults to the namespace of the PostgresCluster being created if not provided. false
schedulesobjectDefines the schedules for the pgBackRest backups Full, Differential and Incremental backup types are supported: https://pgbackrest.org/user-guide.html#concept/backupoptions[]stringCommand line options to include when running the pgBackRest restore command. https://pgbackrest.org/command.html#command-restore false
volumeresources objectRepresents a pgBackRest repository that is created using a PersistentVolumeClaimResource requirements for the pgBackRest restore Job. false
nametolerations[]objectTolerations of the pgBackRest restore Job. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-tolerationfalse
enabledbooleanWhether or not in-place pgBackRest restores are enabled for this PostgresCluster.true
repoName stringThe name of the the repositoryThe name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source for the new PostgresCluster. true
-

- PostgresCluster.spec.backups.pgbackrest.repos[index].azure - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity + ↩ Parent

-Represents a pgBackRest repository that is created using Azure storage +Scheduling constraints of the pgBackRest restore Job. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node @@ -5441,22 +5451,32 @@ Represents a pgBackRest repository that is created using Azure storage - - - - + + + + + + + + + + + + + +
containerstringThe Azure container utilized for the repositorytruenodeAffinityobjectDescribes node affinity scheduling rules for the pod.false
podAffinityobjectDescribes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).false
podAntiAffinityobjectDescribes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).false
-

- PostgresCluster.spec.backups.pgbackrest.repos[index].gcs - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity + ↩ Parent

-Represents a pgBackRest repository that is created using Google Cloud Storage +Describes node affinity scheduling rules for the pod. @@ -5468,22 +5488,27 @@ Represents a pgBackRest repository that is created using Google Cloud Storage - - - - + + + + + + + + +
bucketstringThe GCS bucket utilized for the repositorytruepreferredDuringSchedulingIgnoredDuringExecution[]objectThe scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.false
requiredDuringSchedulingIgnoredDuringExecutionobjectIf the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.false
-

- PostgresCluster.spec.backups.pgbackrest.repos[index].s3 - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] + ↩ Parent

-RepoS3 represents a pgBackRest repository that is created using AWS S3 (or S3-compatible) storage +An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). @@ -5495,32 +5520,27 @@ RepoS3 represents a pgBackRest repository that is created using AWS S3 (or S3-co - - - - - - - - + + + - - - + + +
bucketstringThe S3 bucket utilized for the repositorytrue
endpointstringA valid endpoint corresponding to the specified regionpreferenceobjectA node selector term, associated with the corresponding weight. true
regionstringThe region corresponding to the S3 bucketweightintegerWeight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. true
-

- PostgresCluster.spec.backups.pgbackrest.repos[index].schedules - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference + ↩ Parent

-Defines the schedules for the pgBackRest backups Full, Differential and Incremental backup types are supported: https://pgbackrest.org/user-guide.html#concept/backup +A node selector term, associated with the corresponding weight. @@ -5532,32 +5552,27 @@ Defines the schedules for the pgBackRest backups Full, Differential and Incremen - - - - - - - - + + + - - - + + +
differentialstringDefines the Cron schedule for a differential pgBackRest backup. Follows the standard Cron schedule syntax: https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntaxfalse
fullstringDefines the Cron schedule for a full pgBackRest backup. Follows the standard Cron schedule syntax: https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntaxmatchExpressions[]objectA list of node selector requirements by node's labels. false
incrementalstringDefines the Cron schedule for an incremental pgBackRest backup. Follows the standard Cron schedule syntax: https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntaxmatchFields[]objectA list of node selector requirements by node's fields. false
-

- PostgresCluster.spec.backups.pgbackrest.repos[index].volume - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchExpressions[index] + ↩ Parent

-Represents a pgBackRest repository that is created using a PersistentVolumeClaim +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. @@ -5569,22 +5584,32 @@ Represents a pgBackRest repository that is created using a PersistentVolumeClaim - - - + + + + + + + + + + + + +
volumeClaimSpecobjectDefines a PersistentVolumeClaim spec used to create and/or bind a volumevalues[]stringAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.false
keystringThe label key that the selector applies to.true
operatorstringRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. true
-

- PostgresCluster.spec.backups.pgbackrest.repos[index].volume.volumeClaimSpec - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchFields[index] + ↩ Parent

-Defines a PersistentVolumeClaim spec used to create and/or bind a volume +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. @@ -5596,52 +5621,32 @@ Defines a PersistentVolumeClaim spec used to create and/or bind a volume - + - - - - - - - - - - - - - - - - - - - - - + - + - - + + - + - - + +
accessModesvalues []stringAccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1false
dataSourceobjectThis field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source.false
resourcesobjectResources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resourcesfalse
selectorobjectA label query over volumes to consider for binding.false
storageClassNamestringName of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. false
volumeModekey stringvolumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.falseThe label key that the selector applies to.true
volumeNameoperator stringVolumeName is the binding reference to the PersistentVolume backing this claim.falseRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.true
-

- PostgresCluster.spec.backups.pgbackrest.repos[index].volume.volumeClaimSpec.dataSource - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution + ↩ Parent

-This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. +If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. @@ -5653,32 +5658,22 @@ This field can be used to specify either: * An existing VolumeSnapshot object (s - - - - - - - - - - - - - + + +
apiGroupstringAPIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.false
kindstringKind is the type of resource being referencedtrue
namestringName is the name of resource being referencednodeSelectorTerms[]objectRequired. A list of node selector terms. The terms are ORed. true
-

- PostgresCluster.spec.backups.pgbackrest.repos[index].volume.volumeClaimSpec.resources - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index] + ↩ Parent

-Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources +A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. @@ -5690,59 +5685,27 @@ Resources represents the minimum resources the volume should have. More info: ht - - - - - - - - - - -
limitsmap[string]int or stringLimits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/false
requestsmap[string]int or stringRequests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/false
- - -

- PostgresCluster.spec.backups.pgbackrest.repos[index].volume.volumeClaimSpec.selector - ↩ Parent -

- - - -A label query over volumes to consider for binding. - - - - - - - - - - - - + - + - - - + + +
NameTypeDescriptionRequired
matchExpressionsmatchExpressions []objectmatchExpressions is a list of label selector requirements. The requirements are ANDed.A list of node selector requirements by node's labels. false
matchLabelsmap[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.matchFields[]objectA list of node selector requirements by node's fields. false
-

- PostgresCluster.spec.backups.pgbackrest.repos[index].volume.volumeClaimSpec.selector.matchExpressions[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchExpressions[index] + ↩ Parent

-A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. @@ -5756,30 +5719,30 @@ A label selector requirement is a selector that contains values, a key, and an o - + - + - +
values []stringvalues is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. false
key stringkey is the label key that the selector applies to.The label key that the selector applies to. true
operator stringoperator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. true
-

- PostgresCluster.spec.backups.pgbackrest.restore - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchFields[index] + ↩ Parent

-Defines details for performing an in-place restore using pgBackRest +A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. @@ -5791,57 +5754,32 @@ Defines details for performing an in-place restore using pgBackRest - - - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - + + + - + - +
affinityobjectScheduling constraints of the pgBackRest restore Job. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-nodefalse
clusterNamestringThe name of an existing PostgresCluster to use as the data source for the new PostgresCluster. Defaults to the name of the PostgresCluster being created if not provided.false
clusterNamespacestringThe namespace of the cluster specified as the data source using the clusterName field. Defaults to the namespace of the PostgresCluster being created if not provided.false
optionsvalues []stringCommand line options to include when running the pgBackRest restore command. https://pgbackrest.org/command.html#command-restorefalse
resourcesobjectResource requirements for the pgBackRest restore Job.false
tolerations[]objectTolerations of the pgBackRest restore Job. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-tolerationAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. false
enabledbooleanWhether or not in-place pgBackRest restores are enabled for this PostgresCluster.keystringThe label key that the selector applies to. true
repoNameoperator stringThe name of the pgBackRest repo within the source PostgresCluster that contains the backups that should be utilized to perform a pgBackRest restore when initializing the data source for the new PostgresCluster.Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. true
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity + ↩ Parent

-Scheduling constraints of the pgBackRest restore Job. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node +Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). @@ -5853,32 +5791,27 @@ Scheduling constraints of the pgBackRest restore Job. More info: https://kuberne - - - - - - - - + + + - - - + + +
nodeAffinityobjectDescribes node affinity scheduling rules for the pod.false
podAffinityobjectDescribes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).preferredDuringSchedulingIgnoredDuringExecution[]objectThe scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. false
podAntiAffinityobjectDescribes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).requiredDuringSchedulingIgnoredDuringExecution[]objectIf the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. false
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] + ↩ Parent

-Describes node affinity scheduling rules for the pod. +The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) @@ -5890,27 +5823,27 @@ Describes node affinity scheduling rules for the pod. - - - - - - + - - + + + + + + +
preferredDuringSchedulingIgnoredDuringExecution[]objectThe scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.false
requiredDuringSchedulingIgnoredDuringExecutionpodAffinityTerm objectIf the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.falseRequired. A pod affinity term, associated with the corresponding weight.true
weightintegerweight associated with matching the corresponding podAffinityTerm, in the range 1-100.true
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm + ↩ Parent

-An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). +Required. A pod affinity term, associated with the corresponding weight. @@ -5922,27 +5855,32 @@ An empty preferred scheduling term matches all objects with implicit weight 0 (i - + - - + + - - - + + + + + + + +
preferencelabelSelector objectA node selector term, associated with the corresponding weight.trueA label query over a set of resources, in this case pods.false
weightintegerWeight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.namespaces[]stringnamespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace"false
topologyKeystringThis pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. true
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector + ↩ Parent

-A node selector term, associated with the corresponding weight. +A label query over a set of resources, in this case pods. @@ -5954,27 +5892,27 @@ A node selector term, associated with the corresponding weight. - + - + - - - + + +
matchExpressionsmatchExpressions []objectA list of node selector requirements by node's labels.matchExpressions is a list of label selector requirements. The requirements are ANDed. false
matchFields[]objectA list of node selector requirements by node's fields.matchLabelsmap[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. false
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchExpressions[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index] + ↩ Parent

-A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. @@ -5988,30 +5926,30 @@ A node selector requirement is a selector that contains values, a key, and an op - + - + - +
values []stringAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. false
key stringThe label key that the selector applies to.key is the label key that the selector applies to. true
operator stringRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. true
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].preference.matchFields[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index] + ↩ Parent

-A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running @@ -6023,32 +5961,32 @@ A node selector requirement is a selector that contains values, a key, and an op - - - + + + - - - - + + + + - + - +
values[]stringAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.labelSelectorobjectA label query over a set of resources, in this case pods. false
keystringThe label key that the selector applies to.truenamespaces[]stringnamespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace"false
operatortopologyKey stringRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. true
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector + ↩ Parent

-If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. +A label query over a set of resources, in this case pods. @@ -6060,91 +5998,27 @@ If the affinity requirements specified by this field are not met at scheduling t - + - - + + + + + + +
nodeSelectorTermsmatchExpressions []objectRequired. A list of node selector terms. The terms are ORed.truematchExpressions is a list of label selector requirements. The requirements are ANDed.false
matchLabelsmap[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.false
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index] - ↩ Parent -

- - - -A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
matchExpressions[]objectA list of node selector requirements by node's labels.false
matchFields[]objectA list of node selector requirements by node's fields.false
- - -

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchExpressions[index] - ↩ Parent -

- - - -A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescriptionRequired
values[]stringAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.false
keystringThe label key that the selector applies to.true
operatorstringRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.true
- - -

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[index].matchFields[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index] + ↩ Parent

-A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. @@ -6158,30 +6032,30 @@ A node selector requirement is a selector that contains values, a key, and an op - + - + - +
values []stringAn array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. false
key stringThe label key that the selector applies to.key is the label key that the selector applies to. true
operator stringRepresents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. true
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity ↩ Parent

-Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). +Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). @@ -6193,22 +6067,22 @@ Describes pod affinity scheduling rules (e.g. co-locate this pod in the same nod - + - + - + - +
preferredDuringSchedulingIgnoredDuringExecutionpreferredDuringSchedulingIgnoredDuringExecution []objectThe scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. false
requiredDuringSchedulingIgnoredDuringExecutionrequiredDuringSchedulingIgnoredDuringExecution []objectIf the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. false
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] + ↩ Parent

@@ -6225,7 +6099,7 @@ The weights of all of the matched WeightedPodAffinityTerm fields are added per-n - podAffinityTerm + podAffinityTerm object Required. A pod affinity term, associated with the corresponding weight. true @@ -6238,9 +6112,9 @@ The weights of all of the matched WeightedPodAffinityTerm fields are added per-n -

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm + ↩ Parent

@@ -6257,7 +6131,7 @@ Required. A pod affinity term, associated with the corresponding weight. - labelSelector + labelSelector object A label query over a set of resources, in this case pods. false @@ -6275,9 +6149,9 @@ Required. A pod affinity term, associated with the corresponding weight. -

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector + ↩ Parent

@@ -6294,7 +6168,7 @@ A label query over a set of resources, in this case pods. - matchExpressions + matchExpressions []object matchExpressions is a list of label selector requirements. The requirements are ANDed. false @@ -6307,9 +6181,9 @@ A label query over a set of resources, in this case pods. -

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index] + ↩ Parent

@@ -6344,9 +6218,9 @@ A label selector requirement is a selector that contains values, a key, and an o -

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index] + ↩ Parent

@@ -6363,7 +6237,7 @@ Defines a set of pods (namely those matching the labelSelector relative to the g - labelSelector + labelSelector object A label query over a set of resources, in this case pods. false @@ -6381,9 +6255,9 @@ Defines a set of pods (namely those matching the labelSelector relative to the g -

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector + ↩ Parent

@@ -6400,7 +6274,7 @@ A label query over a set of resources, in this case pods. - matchExpressions + matchExpressions []object matchExpressions is a list of label selector requirements. The requirements are ANDed. false @@ -6413,9 +6287,9 @@ A label query over a set of resources, in this case pods. -

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index] + ↩ Parent

@@ -6450,14 +6324,14 @@ A label selector requirement is a selector that contains values, a key, and an o -

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.resources + ↩ Parent

-Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). +Resource requirements for the pgBackRest restore Job. @@ -6469,27 +6343,27 @@ Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the - - - + + + - - - + + +
preferredDuringSchedulingIgnoredDuringExecution[]objectThe scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.limitsmap[string]int or stringLimits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ false
requiredDuringSchedulingIgnoredDuringExecution[]objectIf the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.requestsmap[string]int or stringRequests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ false
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.restore.tolerations[index] + ↩ Parent

-The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) +The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . @@ -6501,27 +6375,42 @@ The weights of all of the matched WeightedPodAffinityTerm fields are added per-n - - - - + + + + - + + + + + + + + + + + - - + + + + + + +
podAffinityTermobjectRequired. A pod affinity term, associated with the corresponding weight.trueeffectstringEffect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.false
weightkeystringKey is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.false
operatorstringOperator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.false
tolerationSeconds integerweight associated with matching the corresponding podAffinityTerm, in the range 1-100.trueTolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.false
valuestringValue is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.false
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.repos[index] + ↩ Parent

-Required. A pod affinity term, associated with the corresponding weight. +PGBackRestRepo represents a pgBackRest repository. Only one of its members may be specified. @@ -6533,32 +6422,47 @@ Required. A pod affinity term, associated with the corresponding weight. - + - + - - - + + + - + + + + + + + + + + + + + + + + - +
labelSelectorazure objectA label query over a set of resources, in this case pods.Represents a pgBackRest repository that is created using Azure storage false
namespaces[]stringnamespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace"gcsobjectRepresents a pgBackRest repository that is created using Google Cloud Storage false
topologyKeys3objectRepoS3 represents a pgBackRest repository that is created using AWS S3 (or S3-compatible) storagefalse
schedulesobjectDefines the schedules for the pgBackRest backups Full, Differential and Incremental backup types are supported: https://pgbackrest.org/user-guide.html#concept/backupfalse
volumeobjectRepresents a pgBackRest repository that is created using a PersistentVolumeClaimfalse
name stringThis pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.The name of the the repository true
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.repos[index].azure + ↩ Parent

-A label query over a set of resources, in this case pods. +Represents a pgBackRest repository that is created using Azure storage @@ -6570,27 +6474,22 @@ A label query over a set of resources, in this case pods. - - - - - - - - - + + + +
matchExpressions[]objectmatchExpressions is a list of label selector requirements. The requirements are ANDed.false
matchLabelsmap[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.falsecontainerstringThe Azure container utilized for the repositorytrue
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution[index].podAffinityTerm.labelSelector.matchExpressions[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.repos[index].gcs + ↩ Parent

-A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +Represents a pgBackRest repository that is created using Google Cloud Storage @@ -6602,32 +6501,59 @@ A label selector requirement is a selector that contains values, a key, and an o - - - - + + + + + +
values[]stringvalues is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.falsebucketstringThe GCS bucket utilized for the repositorytrue
+ + +

+ PostgresCluster.spec.backups.pgbackrest.repos[index].s3 + ↩ Parent +

+ + + +RepoS3 represents a pgBackRest repository that is created using AWS S3 (or S3-compatible) storage + + + + + + + + + + + + + + + - + - + - + - +
NameTypeDescriptionRequired
bucketstringThe S3 bucket utilized for the repositorytrue
keyendpoint stringkey is the label key that the selector applies to.A valid endpoint corresponding to the specified region true
operatorregion stringoperator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.The region corresponding to the S3 bucket true
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.repos[index].schedules + ↩ Parent

-Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running +Defines the schedules for the pgBackRest backups Full, Differential and Incremental backup types are supported: https://pgbackrest.org/user-guide.html#concept/backup @@ -6639,32 +6565,59 @@ Defines a set of pods (namely those matching the labelSelector relative to the g - - - + + + - - - + + + - + - + + + +
labelSelectorobjectA label query over a set of resources, in this case pods.differentialstringDefines the Cron schedule for a differential pgBackRest backup. Follows the standard Cron schedule syntax: https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax false
namespaces[]stringnamespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace"fullstringDefines the Cron schedule for a full pgBackRest backup. Follows the standard Cron schedule syntax: https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntax false
topologyKeyincremental stringThis pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.Defines the Cron schedule for an incremental pgBackRest backup. Follows the standard Cron schedule syntax: https://k8s.io/docs/concepts/workloads/controllers/cron-jobs/#cron-schedule-syntaxfalse
+ + +

+ PostgresCluster.spec.backups.pgbackrest.repos[index].volume + ↩ Parent +

+ + + +Represents a pgBackRest repository that is created using a PersistentVolumeClaim + + + + + + + + + + + + + +
NameTypeDescriptionRequired
volumeClaimSpecobjectDefines a PersistentVolumeClaim spec used to create and/or bind a volume true
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.repos[index].volume.volumeClaimSpec + ↩ Parent

-A label query over a set of resources, in this case pods. +Defines a PersistentVolumeClaim spec used to create and/or bind a volume @@ -6676,27 +6629,52 @@ A label query over a set of resources, in this case pods. - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
matchExpressions[]objectmatchExpressions is a list of label selector requirements. The requirements are ANDed.accessModes[]stringAccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 false
matchLabelsmap[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.dataSourceobjectThis field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source.false
resourcesobjectResources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resourcesfalse
selectorobjectA label query over volumes to consider for binding.false
storageClassNamestringName of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1false
volumeModestringvolumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.false
volumeNamestringVolumeName is the binding reference to the PersistentVolume backing this claim. false
-

- PostgresCluster.spec.backups.pgbackrest.restore.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution[index].labelSelector.matchExpressions[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.repos[index].volume.volumeClaimSpec.dataSource + ↩ Parent

-A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. @@ -6708,32 +6686,32 @@ A label selector requirement is a selector that contains values, a key, and an o - - - + + + - + - + - + - +
values[]stringvalues is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.apiGroupstringAPIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. false
keykind stringkey is the label key that the selector applies to.Kind is the type of resource being referenced true
operatorname stringoperator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.Name is the name of resource being referenced true
-

- PostgresCluster.spec.backups.pgbackrest.restore.resources - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.repos[index].volume.volumeClaimSpec.resources + ↩ Parent

-Resource requirements for the pgBackRest restore Job. +Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources @@ -6758,14 +6736,14 @@ Resource requirements for the pgBackRest restore Job.
-

- PostgresCluster.spec.backups.pgbackrest.restore.tolerations[index] - ↩ Parent +

+ PostgresCluster.spec.backups.pgbackrest.repos[index].volume.volumeClaimSpec.selector + ↩ Parent

-The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . +A label query over volumes to consider for binding. @@ -6777,30 +6755,52 @@ The pod this Toleration is attached to tolerates any taint that matches the trip - - - + + + - - - + + + - - - - + +
effectstringEffect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.matchExpressions[]objectmatchExpressions is a list of label selector requirements. The requirements are ANDed. false
keystringKey is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.matchLabelsmap[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. false
operatorstringOperator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
+ + +

+ PostgresCluster.spec.backups.pgbackrest.repos[index].volume.volumeClaimSpec.selector.matchExpressions[index] + ↩ Parent +

+ + + +A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + + + + + + + + + + + + + + - - - - + + + + - + - - + +
NameTypeDescriptionRequired
values[]stringvalues is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. false
tolerationSecondsintegerTolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.falsekeystringkey is the label key that the selector applies to.true
valueoperator stringValue is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.falseoperator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.true
diff --git a/internal/controller/postgrescluster/cluster_test.go b/internal/controller/postgrescluster/cluster_test.go index f594429b6c..b9a3c66fef 100644 --- a/internal/controller/postgrescluster/cluster_test.go +++ b/internal/controller/postgrescluster/cluster_test.go @@ -35,6 +35,7 @@ import ( corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" @@ -820,6 +821,19 @@ func TestReconcileClusterPrimaryService(t *testing.T) { cluster.Name = "pg8" cluster.Spec.PostgresVersion = 12 cluster.Spec.InstanceSets = []v1beta1.PostgresInstanceSetSpec{{}} + cluster.Spec.Backups.PGBackRest.Repos = []v1beta1.PGBackRestRepo{{ + Name: "repo1", + Volume: &v1beta1.RepoPVC{ + VolumeClaimSpec: v1.PersistentVolumeClaimSpec{ + AccessModes: []v1.PersistentVolumeAccessMode{corev1.ReadWriteOnce}, + Resources: v1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceStorage: resource.MustParse("1Gi"), + }, + }, + }, + }, + }} assert.NilError(t, cc.Create(ctx, cluster)) diff --git a/internal/controller/postgrescluster/controller_ref_manager_test.go b/internal/controller/postgrescluster/controller_ref_manager_test.go index 460956fbde..71eb6feb1d 100644 --- a/internal/controller/postgrescluster/controller_ref_manager_test.go +++ b/internal/controller/postgrescluster/controller_ref_manager_test.go @@ -25,6 +25,7 @@ import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/rand" "sigs.k8s.io/controller-runtime/pkg/client" @@ -69,6 +70,21 @@ func TestManageControllerRefs(t *testing.T) { Spec: v1beta1.PostgresClusterSpec{ PostgresVersion: 12, InstanceSets: []v1beta1.PostgresInstanceSetSpec{{Name: "instance1"}}, + Backups: v1beta1.Backups{PGBackRest: v1beta1.PGBackRestArchive{ + Repos: []v1beta1.PGBackRestRepo{{ + Name: "repo1", + Volume: &v1beta1.RepoPVC{ + VolumeClaimSpec: corev1.PersistentVolumeClaimSpec{ + AccessModes: []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce}, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceStorage: resource.MustParse("1Gi"), + }, + }, + }, + }, + }}, + }}, }, } diff --git a/internal/controller/postgrescluster/controller_test.go b/internal/controller/postgrescluster/controller_test.go index e234aad0bc..d9ec982d9d 100644 --- a/internal/controller/postgrescluster/controller_test.go +++ b/internal/controller/postgrescluster/controller_test.go @@ -63,6 +63,13 @@ func TestDeleteControlled(t *testing.T) { instances: [{ name: instance, }], + backups: { + pgbackrest: { + repos: [{ + name: repo1, + }], + }, + }, }, }`), cluster)) @@ -190,6 +197,17 @@ spec: resources: requests: storage: 1Gi + backups: + pgbackrest: + repos: + - name: repo1 + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi `) Expect(reconcile(cluster)).To(BeZero()) }) @@ -348,6 +366,17 @@ spec: resources: requests: storage: 1Gi + backups: + pgbackrest: + repos: + - name: repo1 + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi `) Expect(reconcile(cluster)).To(BeZero()) diff --git a/internal/controller/postgrescluster/delete_test.go b/internal/controller/postgrescluster/delete_test.go index e119f34a00..1ce22ab07e 100644 --- a/internal/controller/postgrescluster/delete_test.go +++ b/internal/controller/postgrescluster/delete_test.go @@ -180,12 +180,26 @@ func TestReconcilerHandleDelete(t *testing.T) { }, }, ], + backups: { + pgbackrest: { + repos: [{ + name: repo1, + volume: { + volumeClaimSpec: { + accessModes: [ReadWriteOnce], + resources: { requests: { storage: 1Gi } }, + }, + }, + }], + }, + }, }, }`), cluster)) cluster.Namespace = ns.Name cluster.Name = strings.ToLower(test.name) cluster.Spec.Image = CrunchyPostgresHAImage + cluster.Spec.Backups.PGBackRest.Image = CrunchyPGBackRestImage if test.beforeCreate != nil { test.beforeCreate(t, cluster) @@ -413,12 +427,26 @@ func TestReconcilerHandleDeleteNamespace(t *testing.T) { }, }, ], + backups: { + pgbackrest: { + repos: [{ + name: repo1, + volume: { + volumeClaimSpec: { + accessModes: [ReadWriteOnce], + resources: { requests: { storage: 1Gi } }, + }, + }, + }], + }, + }, }, }`), cluster)) cluster.Namespace = ns.Name cluster.Name = strings.ToLower("DeleteNamespace") cluster.Spec.Image = CrunchyPostgresHAImage + cluster.Spec.Backups.PGBackRest.Image = CrunchyPGBackRestImage assert.NilError(t, cc.Create(ctx, cluster)) diff --git a/internal/controller/postgrescluster/patroni_test.go b/internal/controller/postgrescluster/patroni_test.go index 045fe6a1f3..38b393cae3 100644 --- a/internal/controller/postgrescluster/patroni_test.go +++ b/internal/controller/postgrescluster/patroni_test.go @@ -31,6 +31,7 @@ import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/rand" @@ -168,6 +169,19 @@ func TestReconcilePatroniLeaderLease(t *testing.T) { cluster.Name = "pg2" cluster.Spec.PostgresVersion = 12 cluster.Spec.InstanceSets = []v1beta1.PostgresInstanceSetSpec{{}} + cluster.Spec.Backups.PGBackRest.Repos = []v1beta1.PGBackRestRepo{{ + Name: "repo1", + Volume: &v1beta1.RepoPVC{ + VolumeClaimSpec: v1.PersistentVolumeClaimSpec{ + AccessModes: []v1.PersistentVolumeAccessMode{corev1.ReadWriteOnce}, + Resources: v1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceStorage: resource.MustParse("1Gi"), + }, + }, + }, + }, + }} assert.NilError(t, cc.Create(ctx, cluster)) diff --git a/internal/controller/postgrescluster/pgbouncer_test.go b/internal/controller/postgrescluster/pgbouncer_test.go index 1a73a079e6..b22e3f1d4f 100644 --- a/internal/controller/postgrescluster/pgbouncer_test.go +++ b/internal/controller/postgrescluster/pgbouncer_test.go @@ -23,6 +23,7 @@ import ( "gotest.tools/v3/assert" corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" "sigs.k8s.io/controller-runtime/pkg/client" "github.com/crunchydata/postgres-operator/internal/initialize" @@ -185,6 +186,19 @@ func TestReconcilePGBouncerService(t *testing.T) { cluster.Name = "pg2" cluster.Spec.PostgresVersion = 12 cluster.Spec.InstanceSets = []v1beta1.PostgresInstanceSetSpec{{}} + cluster.Spec.Backups.PGBackRest.Repos = []v1beta1.PGBackRestRepo{{ + Name: "repo1", + Volume: &v1beta1.RepoPVC{ + VolumeClaimSpec: corev1.PersistentVolumeClaimSpec{ + AccessModes: []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce}, + Resources: corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceStorage: resource.MustParse("1Gi"), + }, + }, + }, + }, + }} assert.NilError(t, cc.Create(ctx, cluster)) diff --git a/internal/controller/postgrescluster/pki_test.go b/internal/controller/postgrescluster/pki_test.go index d35a54e30f..c28ec2f341 100644 --- a/internal/controller/postgrescluster/pki_test.go +++ b/internal/controller/postgrescluster/pki_test.go @@ -28,6 +28,7 @@ import ( "github.com/pkg/errors" apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/util/wait" "gotest.tools/v3/assert" @@ -80,6 +81,21 @@ func TestReconcileCerts(t *testing.T) { InstanceSets: []v1beta1.PostgresInstanceSetSpec{{ Name: "instance", }}, + Backups: v1beta1.Backups{PGBackRest: v1beta1.PGBackRestArchive{ + Repos: []v1beta1.PGBackRestRepo{{ + Name: "repo1", + Volume: &v1beta1.RepoPVC{ + VolumeClaimSpec: v1.PersistentVolumeClaimSpec{ + AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce}, + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceStorage: resource.MustParse("1Gi"), + }, + }, + }, + }, + }}, + }}, }, } cluster1.SetGroupVersionKind(v1.SchemeGroupVersion.WithKind("postgrescluster")) @@ -100,6 +116,21 @@ func TestReconcileCerts(t *testing.T) { InstanceSets: []v1beta1.PostgresInstanceSetSpec{{ Name: "instance", }}, + Backups: v1beta1.Backups{PGBackRest: v1beta1.PGBackRestArchive{ + Repos: []v1beta1.PGBackRestRepo{{ + Name: "repo1", + Volume: &v1beta1.RepoPVC{ + VolumeClaimSpec: v1.PersistentVolumeClaimSpec{ + AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce}, + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceStorage: resource.MustParse("1Gi"), + }, + }, + }, + }, + }}, + }}, }, } cluster2.SetGroupVersionKind(v1.SchemeGroupVersion.WithKind("postgrescluster")) diff --git a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgbackrest_types.go b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgbackrest_types.go index 300f66203b..f5eaea5244 100644 --- a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgbackrest_types.go +++ b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgbackrest_types.go @@ -121,10 +121,10 @@ type PGBackRestArchive struct { Image string `json:"image,omitempty"` // Defines a pgBackRest repository - // +kubebuilder:validation:Required + // +kubebuilder:validation:MinItems=1 // +listType=map // +listMapKey=name - Repos []PGBackRestRepo `json:"repos,omitempty"` + Repos []PGBackRestRepo `json:"repos"` // Defines configuration for a pgBackRest dedicated repository host. This section is only // applicable if at least one "volume" (i.e. PVC-based) repository is defined in the "repos" diff --git a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_test.go b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_test.go index 3cfb01c19e..d379f6729f 100644 --- a/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_test.go +++ b/pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_test.go @@ -51,7 +51,8 @@ metadata: creationTimestamp: null spec: backups: - pgbackrest: {} + pgbackrest: + repos: null instances: null patroni: dynamicConfiguration: null @@ -81,7 +82,8 @@ metadata: creationTimestamp: null spec: backups: - pgbackrest: {} + pgbackrest: + repos: null instances: - dataVolumeClaimSpec: resources: {}