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
- azure |
+ affinity |
object |
- 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 |
false |
- gcs |
- object |
- Represents a pgBackRest repository that is created using Google Cloud Storage |
+ clusterName |
+ string |
+ The 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 |
- s3 |
- object |
- RepoS3 represents a pgBackRest repository that is created using AWS S3 (or S3-compatible) storage |
+ clusterNamespace |
+ string |
+ The 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 |
- schedules |
- object |
- Defines the schedules for the pgBackRest backups Full, Differential and Incremental backup types are supported: https://pgbackrest.org/user-guide.html#concept/backup |
+ options |
+ []string |
+ Command line options to include when running the pgBackRest restore command. https://pgbackrest.org/command.html#command-restore |
false |
- volume |
+ resources |
object |
- Represents a pgBackRest repository that is created using a PersistentVolumeClaim |
+ Resource requirements for the pgBackRest restore Job. |
false |
- name |
+ tolerations |
+ []object |
+ Tolerations of the pgBackRest restore Job. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration |
+ false |
+
+ enabled |
+ boolean |
+ Whether or not in-place pgBackRest restores are enabled for this PostgresCluster. |
+ true |
+
+ repoName |
string |
- The name of the the repository |
+ The 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
- container |
- string |
- The Azure container utilized for the repository |
- true |
+ nodeAffinity |
+ object |
+ Describes node affinity scheduling rules for the pod. |
+ false |
+
+ podAffinity |
+ object |
+ Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). |
+ false |
+
+ podAntiAffinity |
+ object |
+ Describes 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
- bucket |
- string |
- The GCS bucket utilized for the repository |
- true |
+ preferredDuringSchedulingIgnoredDuringExecution |
+ []object |
+ The 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 |
+
+ requiredDuringSchedulingIgnoredDuringExecution |
+ object |
+ 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. |
+ 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
- bucket |
- string |
- The S3 bucket utilized for the repository |
- true |
-
- endpoint |
- string |
- A valid endpoint corresponding to the specified region |
+ preference |
+ object |
+ A node selector term, associated with the corresponding weight. |
true |
- region |
- string |
- The region corresponding to the S3 bucket |
+ weight |
+ integer |
+ Weight 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
- differential |
- string |
- Defines 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 |
-
- full |
- string |
- Defines 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 |
+ matchExpressions |
+ []object |
+ A list of node selector requirements by node's labels. |
false |
- incremental |
- string |
- 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-syntax |
+ matchFields |
+ []object |
+ A 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
- volumeClaimSpec |
- object |
- Defines a PersistentVolumeClaim spec used to create and/or bind a volume |
+ values |
+ []string |
+ 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 |
+ string |
+ The label key that the selector applies to. |
+ true |
+
+ operator |
+ string |
+ 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.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
- accessModes |
+ values |
[]string |
- AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 |
- false |
-
- dataSource |
- object |
- 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. |
- false |
-
- resources |
- object |
- Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources |
- false |
-
- selector |
- object |
- A label query over volumes to consider for binding. |
- false |
-
- storageClassName |
- string |
- Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 |
+ 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 |
- volumeMode |
+ key |
string |
- volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. |
- false |
+ The label key that the selector applies to. |
+ true |
- volumeName |
+ operator |
string |
- VolumeName is the binding reference to the PersistentVolume backing this claim. |
- false |
+ 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.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
- apiGroup |
- string |
- APIGroup 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 |
-
- kind |
- string |
- Kind is the type of resource being referenced |
- true |
-
- name |
- string |
- Name is the name of resource being referenced |
+ nodeSelectorTerms |
+ []object |
+ Required. 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
- limits |
- map[string]int or string |
- Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ |
- false |
-
- requests |
- map[string]int or string |
- Requests 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.
-
-
-
-
- Name |
- Type |
- Description |
- Required |
-
-
-
- matchExpressions |
+ matchExpressions |
[]object |
- matchExpressions is a list of label selector requirements. The requirements are ANDed. |
+ A list of node selector requirements by node's labels. |
false |
- matchLabels |
- map[string]string |
- matchLabels 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 |
+ []object |
+ A 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 |
[]string |
- 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. |
+ 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 |
string |
- key is the label key that the selector applies to. |
+ The label key that the selector applies to. |
true |
operator |
string |
- operator 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
- affinity |
- object |
- Scheduling constraints of the pgBackRest restore Job. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node |
- false |
-
- clusterName |
- string |
- The 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 |
-
- clusterNamespace |
- string |
- The 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 |
-
- options |
+ values |
[]string |
- Command line options to include when running the pgBackRest restore command. https://pgbackrest.org/command.html#command-restore |
- false |
-
- resources |
- object |
- Resource requirements for the pgBackRest restore Job. |
- false |
-
- tolerations |
- []object |
- Tolerations of the pgBackRest restore Job. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration |
+ 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 |
- enabled |
- boolean |
- Whether or not in-place pgBackRest restores are enabled for this PostgresCluster. |
+ key |
+ string |
+ The label key that the selector applies to. |
true |
- repoName |
+ operator |
string |
- The 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
- nodeAffinity |
- object |
- Describes node affinity scheduling rules for the pod. |
- false |
-
- podAffinity |
- object |
- Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). |
+ preferredDuringSchedulingIgnoredDuringExecution |
+ []object |
+ The 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 |
- podAntiAffinity |
- object |
- Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). |
+ requiredDuringSchedulingIgnoredDuringExecution |
+ []object |
+ 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 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 |
- []object |
- The 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 |
-
- requiredDuringSchedulingIgnoredDuringExecution |
+ podAffinityTerm |
object |
- 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. |
- false |
+ Required. A pod affinity term, associated with the corresponding weight. |
+ true |
+
+ weight |
+ integer |
+ weight 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
- preference |
+ labelSelector |
object |
- A node selector term, associated with the corresponding weight. |
- true |
+ A label query over a set of resources, in this case pods. |
+ false |
- weight |
- integer |
- Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. |
+ namespaces |
+ []string |
+ namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" |
+ false |
+
+ topologyKey |
+ string |
+ 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.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.
- matchExpressions |
+ matchExpressions |
[]object |
- A list of node selector requirements by node's labels. |
+ matchExpressions is a list of label selector requirements. The requirements are ANDed. |
false |
- matchFields |
- []object |
- A list of node selector requirements by node's fields. |
+ matchLabels |
+ map[string]string |
+ matchLabels 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 |
[]string |
- 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. |
+ 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 |
string |
- The label key that the selector applies to. |
+ key is the label key that the selector applies to. |
true |
operator |
string |
- Represents 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 |
- []string |
- 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. |
+ labelSelector |
+ object |
+ A label query over a set of resources, in this case pods. |
false |
- key |
- string |
- The label key that the selector applies to. |
- true |
+ namespaces |
+ []string |
+ namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" |
+ false |
- operator |
+ topologyKey |
string |
- Represents 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
- nodeSelectorTerms |
+ matchExpressions |
[]object |
- Required. A list of node selector terms. The terms are ORed. |
- true |
+ matchExpressions is a list of label selector requirements. The requirements are ANDed. |
+ false |
+
+ matchLabels |
+ map[string]string |
+ matchLabels 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.
-
-
-
-
- Name |
- Type |
- Description |
- Required |
-
-
-
- matchExpressions |
- []object |
- A list of node selector requirements by node's labels. |
- false |
-
- matchFields |
- []object |
- A 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.
-
-
-
-
- Name |
- Type |
- Description |
- Required |
-
-
-
- values |
- []string |
- 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 |
- string |
- The label key that the selector applies to. |
- true |
-
- operator |
- string |
- 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.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 |
[]string |
- 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. |
+ 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 |
string |
- The label key that the selector applies to. |
+ key is the label key that the selector applies to. |
true |
operator |
string |
- Represents 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
- preferredDuringSchedulingIgnoredDuringExecution |
+ preferredDuringSchedulingIgnoredDuringExecution |
[]object |
- The 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 |
- requiredDuringSchedulingIgnoredDuringExecution |
+ requiredDuringSchedulingIgnoredDuringExecution |
[]object |
- 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 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 |
- []object |
- 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. |
+ limits |
+ map[string]int or string |
+ Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ |
false |
- requiredDuringSchedulingIgnoredDuringExecution |
- []object |
- 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. |
+ requests |
+ map[string]int or string |
+ Requests 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
- podAffinityTerm |
- object |
- Required. A pod affinity term, associated with the corresponding weight. |
- true |
+ effect |
+ string |
+ Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. |
+ false |
- weight |
+ key |
+ string |
+ Key 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 |
+
+ operator |
+ string |
+ Operator 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 |
integer |
- weight associated with matching the corresponding podAffinityTerm, in the range 1-100. |
- true |
+ TolerationSeconds 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 |
+
+ value |
+ string |
+ Value 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.
- labelSelector |
+ azure |
object |
- A label query over a set of resources, in this case pods. |
+ Represents a pgBackRest repository that is created using Azure storage |
false |
- namespaces |
- []string |
- namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" |
+ gcs |
+ object |
+ Represents a pgBackRest repository that is created using Google Cloud Storage |
false |
- topologyKey |
+ s3 |
+ object |
+ RepoS3 represents a pgBackRest repository that is created using AWS S3 (or S3-compatible) storage |
+ false |
+
+ schedules |
+ object |
+ Defines the schedules for the pgBackRest backups Full, Differential and Incremental backup types are supported: https://pgbackrest.org/user-guide.html#concept/backup |
+ false |
+
+ volume |
+ object |
+ Represents a pgBackRest repository that is created using a PersistentVolumeClaim |
+ false |
+
+ name |
string |
- 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. |
+ 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 |
- []object |
- matchExpressions is a list of label selector requirements. The requirements are ANDed. |
- false |
-
- matchLabels |
- map[string]string |
- matchLabels 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 |
+ container |
+ string |
+ The Azure container utilized for the repository |
+ true |
-
- 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 |
- []string |
- 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 |
+ bucket |
+ string |
+ The GCS bucket utilized for the repository |
+ true |
+
+
+
+
+
+ PostgresCluster.spec.backups.pgbackrest.repos[index].s3
+ ↩ Parent
+
+
+
+
+RepoS3 represents a pgBackRest repository that is created using AWS S3 (or S3-compatible) storage
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ bucket |
+ string |
+ The S3 bucket utilized for the repository |
+ true |
- key |
+ endpoint |
string |
- key is the label key that the selector applies to. |
+ A valid endpoint corresponding to the specified region |
true |
- operator |
+ region |
string |
- operator 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
- labelSelector |
- object |
- A label query over a set of resources, in this case pods. |
+ differential |
+ string |
+ Defines 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 |
- []string |
- namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" |
+ full |
+ string |
+ Defines 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 |
- topologyKey |
+ incremental |
string |
- 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. |
+ 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-syntax |
+ false |
+
+
+
+
+
+ PostgresCluster.spec.backups.pgbackrest.repos[index].volume
+ ↩ Parent
+
+
+
+
+Represents a pgBackRest repository that is created using a PersistentVolumeClaim
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ volumeClaimSpec |
+ object |
+ Defines 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 |
- []object |
- matchExpressions is a list of label selector requirements. The requirements are ANDed. |
+ accessModes |
+ []string |
+ AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 |
false |
- matchLabels |
- map[string]string |
- matchLabels 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. |
+ dataSource |
+ object |
+ 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. |
+ false |
+
+ resources |
+ object |
+ Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources |
+ false |
+
+ selector |
+ object |
+ A label query over volumes to consider for binding. |
+ false |
+
+ storageClassName |
+ string |
+ Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 |
+ false |
+
+ volumeMode |
+ string |
+ volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. |
+ false |
+
+ volumeName |
+ string |
+ VolumeName 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 |
- []string |
- 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. |
+ apiGroup |
+ string |
+ APIGroup 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 |
- key |
+ kind |
string |
- key is the label key that the selector applies to. |
+ Kind is the type of resource being referenced |
true |
- operator |
+ name |
string |
- operator 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
- effect |
- string |
- Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. |
+ matchExpressions |
+ []object |
+ matchExpressions is a list of label selector requirements. The requirements are ANDed. |
false |
- key |
- string |
- Key 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. |
+ matchLabels |
+ map[string]string |
+ matchLabels 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 |
-
- operator |
- string |
- Operator 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.
+
+
+
+
+ Name |
+ Type |
+ Description |
+ Required |
+
+
+
+ values |
+ []string |
+ 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 |
- tolerationSeconds |
- integer |
- TolerationSeconds 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 |
+ key |
+ string |
+ key is the label key that the selector applies to. |
+ true |
- value |
+ operator |
string |
- Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. |
- false |
+ operator 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: {}