@@ -157,7 +157,7 @@ type NooBaaSpec struct {
157
157
158
158
// Affinity (optional) passed through to noobaa's pods
159
159
// +optional
160
- Affinity * corev1. Affinity `json:"affinity,omitempty"`
160
+ Affinity * AffinitySpec `json:"affinity,omitempty"`
161
161
162
162
// ImagePullSecret (optional) sets a pull secret for the system image
163
163
// +optional
@@ -242,6 +242,24 @@ type NooBaaSpec struct {
242
242
BucketNotifications BucketNotificationsSpec `json:"bucketNotifications,omitempty"`
243
243
}
244
244
245
+ // Affinity is a group of affinity scheduling rules.
246
+ type AffinitySpec struct {
247
+ // Describes node affinity scheduling rules for the pod.
248
+ // +optional
249
+ NodeAffinity * corev1.NodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,1,opt,name=nodeAffinity"`
250
+ // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
251
+ // +optional
252
+ PodAffinity * corev1.PodAffinity `json:"podAffinity,omitempty" protobuf:"bytes,2,opt,name=podAffinity"`
253
+ // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
254
+ // +optional
255
+ PodAntiAffinity * corev1.PodAntiAffinity `json:"podAntiAffinity,omitempty" protobuf:"bytes,3,opt,name=podAntiAffinity"`
256
+
257
+ // TopologyKey (optional) the TopologyKey to pass as the domain for TopologySpreadConstraint and Affinity of noobaa components
258
+ // It is used by the endpoints and the DB pods to control pods distribution between topology domains (host/zone)
259
+ // +optional
260
+ TopologyKey string `json:"topologyKey,omitempty"`
261
+ }
262
+
245
263
// AutoscalerSpec defines different actoscaling spec such as autoscaler type and prometheus namespace
246
264
type AutoscalerSpec struct {
247
265
// Type of autoscaling (optional) for noobaa-endpoint, hpav2(default) and keda - Prometheus metrics based
@@ -640,7 +658,7 @@ const (
640
658
// DeleteOBCConfirmation represents the validation to destry obc
641
659
DeleteOBCConfirmation CleanupConfirmationProperty = "yes-really-destroy-obc"
642
660
643
- // SkipTopologyConstraints is Annotation name for disabling default topology Constraints
661
+ // SkipTopologyConstraints is Annotation name for skipping the reconciliation of the default topology Constraints
644
662
SkipTopologyConstraints = "noobaa.io/skip_topology_spread_constraints"
645
663
646
664
// DisableDBDefaultMonitoring is Annotation name for disabling default db monitoring
0 commit comments