From ecf97cbc47a994fdb29d5135b004b9e82c654136 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Tue, 1 Aug 2023 22:39:57 +0300 Subject: [PATCH 1/8] K8SPSMDB-227: Add `topologySpreadConstraints` https://jira.percona.com/browse/K8SPSMDB-227 --- ...mdb.percona.com_perconaservermongodbs.yaml | 455 ++++++++++++++++++ deploy/bundle.yaml | 455 ++++++++++++++++++ deploy/crd.yaml | 455 ++++++++++++++++++ deploy/cw-bundle.yaml | 455 ++++++++++++++++++ e2e-tests/version-service/conf/crd.yaml | 455 ++++++++++++++++++ pkg/apis/psmdb/v1/psmdb_defaults.go | 21 + pkg/apis/psmdb/v1/psmdb_types.go | 19 +- pkg/apis/psmdb/v1/zz_generated.deepcopy.go | 7 + pkg/psmdb/mongos.go | 25 +- pkg/psmdb/statefulset.go | 42 +- 10 files changed, 2355 insertions(+), 34 deletions(-) diff --git a/config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml b/config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml index a115ce7251..7464c506f7 100644 --- a/config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml +++ b/config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml @@ -2617,6 +2617,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -2854,6 +2867,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array required: - enabled - size @@ -5025,6 +5090,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -5262,6 +5340,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -6837,6 +6967,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -7120,6 +7263,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -9332,6 +9527,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -9569,6 +9777,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array required: - enabled - size @@ -11740,6 +12000,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -11977,6 +12250,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -13552,6 +13877,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -13835,6 +14173,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -15977,6 +16367,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -16214,6 +16617,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: object required: - enabled diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 3852a7d93c..1aadee60b3 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -3220,6 +3220,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -3457,6 +3470,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array required: - enabled - size @@ -5628,6 +5693,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -5865,6 +5943,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -7440,6 +7570,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -7723,6 +7866,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -9935,6 +10130,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -10172,6 +10380,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array required: - enabled - size @@ -12343,6 +12603,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -12580,6 +12853,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -14155,6 +14480,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -14438,6 +14776,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -16580,6 +16970,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -16817,6 +17220,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: object required: - enabled diff --git a/deploy/crd.yaml b/deploy/crd.yaml index f325fbe59c..f5e948a79f 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -3220,6 +3220,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -3457,6 +3470,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array required: - enabled - size @@ -5628,6 +5693,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -5865,6 +5943,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -7440,6 +7570,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -7723,6 +7866,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -9935,6 +10130,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -10172,6 +10380,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array required: - enabled - size @@ -12343,6 +12603,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -12580,6 +12853,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -14155,6 +14480,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -14438,6 +14776,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -16580,6 +16970,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -16817,6 +17220,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: object required: - enabled diff --git a/deploy/cw-bundle.yaml b/deploy/cw-bundle.yaml index 95968ce3c6..4b284117a7 100644 --- a/deploy/cw-bundle.yaml +++ b/deploy/cw-bundle.yaml @@ -3220,6 +3220,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -3457,6 +3470,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array required: - enabled - size @@ -5628,6 +5693,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -5865,6 +5943,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -7440,6 +7570,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -7723,6 +7866,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -9935,6 +10130,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -10172,6 +10380,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array required: - enabled - size @@ -12343,6 +12603,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -12580,6 +12853,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -14155,6 +14480,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -14438,6 +14776,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -16580,6 +16970,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -16817,6 +17220,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: object required: - enabled diff --git a/e2e-tests/version-service/conf/crd.yaml b/e2e-tests/version-service/conf/crd.yaml index f325fbe59c..f5e948a79f 100644 --- a/e2e-tests/version-service/conf/crd.yaml +++ b/e2e-tests/version-service/conf/crd.yaml @@ -3220,6 +3220,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -3457,6 +3470,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array required: - enabled - size @@ -5628,6 +5693,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -5865,6 +5943,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -7440,6 +7570,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -7723,6 +7866,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -9935,6 +10130,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -10172,6 +10380,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array required: - enabled - size @@ -12343,6 +12603,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -12580,6 +12853,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -14155,6 +14480,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -14438,6 +14776,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array volumeSpec: properties: emptyDir: @@ -16580,6 +16970,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -16817,6 +17220,58 @@ spec: type: string type: object type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array type: object required: - enabled diff --git a/pkg/apis/psmdb/v1/psmdb_defaults.go b/pkg/apis/psmdb/v1/psmdb_defaults.go index d7333e475a..a572f3ae89 100644 --- a/pkg/apis/psmdb/v1/psmdb_defaults.go +++ b/pkg/apis/psmdb/v1/psmdb_defaults.go @@ -759,6 +759,7 @@ func (rs *ReplsetSpec) setSafeDefaults(log logr.Logger) { func (m *MultiAZ) reconcileOpts() { m.reconcileAffinityOpts() + m.reconcileTopologySpreadConstraints() if m.PodDisruptionBudget == nil { defaultMaxUnavailable := intstr.FromInt(1) @@ -802,6 +803,26 @@ func (m *MultiAZ) reconcileAffinityOpts() { } } +func (m *MultiAZ) reconcileTopologySpreadConstraints() { + if len(m.TopologySpreadConstraints) == 0 { + m.TopologySpreadConstraints = []corev1.TopologySpreadConstraint{ + {}, // this line ensures that the slice contains at least one element + } + } + + for i := range m.TopologySpreadConstraints { + if m.TopologySpreadConstraints[i].MaxSkew == 0 { + m.TopologySpreadConstraints[i].MaxSkew = 1 + } + if m.TopologySpreadConstraints[i].TopologyKey == "" { + m.TopologySpreadConstraints[i].TopologyKey = defaultAffinityTopologyKey + } + if m.TopologySpreadConstraints[i].WhenUnsatisfiable == "" { + m.TopologySpreadConstraints[i].WhenUnsatisfiable = corev1.DoNotSchedule + } + } +} + func (v *VolumeSpec) reconcileOpts() error { if v.EmptyDir == nil && v.HostPath == nil && v.PersistentVolumeClaim.PersistentVolumeClaimSpec == nil { v.PersistentVolumeClaim.PersistentVolumeClaimSpec = &corev1.PersistentVolumeClaimSpec{} diff --git a/pkg/apis/psmdb/v1/psmdb_types.go b/pkg/apis/psmdb/v1/psmdb_types.go index ad262df31e..c332ad7da3 100644 --- a/pkg/apis/psmdb/v1/psmdb_types.go +++ b/pkg/apis/psmdb/v1/psmdb_types.go @@ -302,15 +302,16 @@ func (spec *PMMSpec) ShouldUseAPIKeyAuth(secret *corev1.Secret) bool { } type MultiAZ struct { - Affinity *PodAffinity `json:"affinity,omitempty"` - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - PriorityClassName string `json:"priorityClassName,omitempty"` - ServiceAccountName string `json:"serviceAccountName,omitempty"` - Annotations map[string]string `json:"annotations,omitempty"` - Labels map[string]string `json:"labels,omitempty"` - PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` - RuntimeClassName *string `json:"runtimeClassName,omitempty"` + Affinity *PodAffinity `json:"affinity,omitempty"` + TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + Tolerations []corev1.Toleration `json:"tolerations,omitempty"` + PriorityClassName string `json:"priorityClassName,omitempty"` + ServiceAccountName string `json:"serviceAccountName,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + PodDisruptionBudget *PodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` + RuntimeClassName *string `json:"runtimeClassName,omitempty"` Resources corev1.ResourceRequirements `json:"resources,omitempty"` diff --git a/pkg/apis/psmdb/v1/zz_generated.deepcopy.go b/pkg/apis/psmdb/v1/zz_generated.deepcopy.go index ea8e78b9b5..7f172d5e27 100644 --- a/pkg/apis/psmdb/v1/zz_generated.deepcopy.go +++ b/pkg/apis/psmdb/v1/zz_generated.deepcopy.go @@ -663,6 +663,13 @@ func (in *MultiAZ) DeepCopyInto(out *MultiAZ) { *out = new(PodAffinity) (*in).DeepCopyInto(*out) } + if in.TopologySpreadConstraints != nil { + in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints + *out = make([]corev1.TopologySpreadConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.NodeSelector != nil { in, out := &in.NodeSelector, &out.NodeSelector *out = make(map[string]string, len(*in)) diff --git a/pkg/psmdb/mongos.go b/pkg/psmdb/mongos.go index c54c760e41..3d72b07792 100644 --- a/pkg/psmdb/mongos.go +++ b/pkg/psmdb/mongos.go @@ -122,18 +122,19 @@ func MongosTemplateSpec(cr *api.PerconaServerMongoDB, initImage string, log logr Annotations: annotations, }, Spec: corev1.PodSpec{ - SecurityContext: cr.Spec.Sharding.Mongos.PodSecurityContext, - Affinity: PodAffinity(cr, cr.Spec.Sharding.Mongos.MultiAZ.Affinity, ls), - NodeSelector: cr.Spec.Sharding.Mongos.MultiAZ.NodeSelector, - Tolerations: cr.Spec.Sharding.Mongos.MultiAZ.Tolerations, - PriorityClassName: cr.Spec.Sharding.Mongos.MultiAZ.PriorityClassName, - RestartPolicy: corev1.RestartPolicyAlways, - ImagePullSecrets: cr.Spec.ImagePullSecrets, - Containers: containers, - InitContainers: initContainers, - Volumes: volumes(cr, customConf.Type), - SchedulerName: cr.Spec.SchedulerName, - RuntimeClassName: cr.Spec.Sharding.Mongos.MultiAZ.RuntimeClassName, + SecurityContext: cr.Spec.Sharding.Mongos.PodSecurityContext, + Affinity: PodAffinity(cr, cr.Spec.Sharding.Mongos.MultiAZ.Affinity, ls), + TopologySpreadConstraints: PodTopologySpreadConstraints(cr, cr.Spec.Sharding.Mongos.MultiAZ.TopologySpreadConstraints, ls), + NodeSelector: cr.Spec.Sharding.Mongos.MultiAZ.NodeSelector, + Tolerations: cr.Spec.Sharding.Mongos.MultiAZ.Tolerations, + PriorityClassName: cr.Spec.Sharding.Mongos.MultiAZ.PriorityClassName, + RestartPolicy: corev1.RestartPolicyAlways, + ImagePullSecrets: cr.Spec.ImagePullSecrets, + Containers: containers, + InitContainers: initContainers, + Volumes: volumes(cr, customConf.Type), + SchedulerName: cr.Spec.SchedulerName, + RuntimeClassName: cr.Spec.Sharding.Mongos.MultiAZ.RuntimeClassName, }, }, nil } diff --git a/pkg/psmdb/statefulset.go b/pkg/psmdb/statefulset.go index 067bc2717a..e90582828c 100644 --- a/pkg/psmdb/statefulset.go +++ b/pkg/psmdb/statefulset.go @@ -141,19 +141,20 @@ func StatefulSpec(ctx context.Context, cr *api.PerconaServerMongoDB, replset *ap Annotations: annotations, }, Spec: corev1.PodSpec{ - SecurityContext: podSecurityContext, - Affinity: PodAffinity(cr, multiAZ.Affinity, customLabels), - NodeSelector: multiAZ.NodeSelector, - Tolerations: multiAZ.Tolerations, - PriorityClassName: multiAZ.PriorityClassName, - ServiceAccountName: multiAZ.ServiceAccountName, - RestartPolicy: corev1.RestartPolicyAlways, - ImagePullSecrets: cr.Spec.ImagePullSecrets, - Containers: containers, - InitContainers: initContainers, - Volumes: volumes, - SchedulerName: cr.Spec.SchedulerName, - RuntimeClassName: multiAZ.RuntimeClassName, + SecurityContext: podSecurityContext, + Affinity: PodAffinity(cr, multiAZ.Affinity, customLabels), + TopologySpreadConstraints: PodTopologySpreadConstraints(cr, multiAZ.TopologySpreadConstraints, customLabels), + NodeSelector: multiAZ.NodeSelector, + Tolerations: multiAZ.Tolerations, + PriorityClassName: multiAZ.PriorityClassName, + ServiceAccountName: multiAZ.ServiceAccountName, + RestartPolicy: corev1.RestartPolicyAlways, + ImagePullSecrets: cr.Spec.ImagePullSecrets, + Containers: containers, + InitContainers: initContainers, + Volumes: volumes, + SchedulerName: cr.Spec.SchedulerName, + RuntimeClassName: multiAZ.RuntimeClassName, }, }, }, nil @@ -226,6 +227,21 @@ func PodAffinity(cr *api.PerconaServerMongoDB, af *api.PodAffinity, labels map[s return nil } +func PodTopologySpreadConstraints(cr *api.PerconaServerMongoDB, tscs []corev1.TopologySpreadConstraint, ls map[string]string) []corev1.TopologySpreadConstraint { + result := make([]corev1.TopologySpreadConstraint, 0, len(tscs)) + + for _, tsc := range tscs { + if tsc.LabelSelector == nil && tsc.MatchLabelKeys == nil { + tsc.LabelSelector = &metav1.LabelSelector{ + MatchLabels: ls, + } + } + + result = append(result, tsc) + } + return result +} + func isEncryptionEnabled(cr *api.PerconaServerMongoDB, replset *api.ReplsetSpec) (bool, error) { if cr.CompareVersion("1.12.0") >= 0 { enabled, err := replset.Configuration.IsEncryptionEnabled() From 6796ce71e62001b334a934a0fee795a25c9f4f1b Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Thu, 3 Aug 2023 14:28:34 +0300 Subject: [PATCH 2/8] fix tests --- .../statefulset_arbiter-clusterip-rs0-arbiter-oc.yml | 12 ++++++++++++ .../statefulset_arbiter-clusterip-rs0-arbiter.yml | 12 ++++++++++++ .../compare/statefulset_arbiter-rs0-arbiter-oc.yml | 12 ++++++++++++ .../compare/statefulset_arbiter-rs0-arbiter.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0.yml | 12 ++++++++++++ .../statefulset_some-name-rs0_restore_sharded-oc.yml | 12 ++++++++++++ .../statefulset_some-name-rs0_restore_sharded.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0_restore-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0_restore.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg-4-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg.yml | 12 ++++++++++++ .../compare/statefulset_some-name-mongos-4-oc.yml | 11 +++++++++++ .../compare/statefulset_some-name-mongos-oc.yml | 11 +++++++++++ .../compare/statefulset_some-name-mongos-secret.yml | 11 +++++++++++ .../compare/statefulset_some-name-mongos.yml | 11 +++++++++++ .../compare/statefulset_some-name-rs0-4-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs1-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs1.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs2-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs2.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg-4-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg.yml | 12 ++++++++++++ .../compare/statefulset_some-name-mongos-4-oc.yml | 11 +++++++++++ .../compare/statefulset_some-name-mongos-oc.yml | 11 +++++++++++ .../compare/statefulset_some-name-mongos.yml | 11 +++++++++++ .../compare/statefulset_some-name-rs0-4-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0.yml | 12 ++++++++++++ .../compare/statefulset_another-name-rs0-4-oc.yml | 12 ++++++++++++ .../compare/statefulset_another-name-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_another-name-rs0.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0.yml | 12 ++++++++++++ .../statefulset_no-limits-rs0-increased-oc.yml | 12 ++++++++++++ .../compare/statefulset_no-limits-rs0-increased.yml | 12 ++++++++++++ .../limits/compare/statefulset_no-limits-rs0-oc.yml | 12 ++++++++++++ .../limits/compare/statefulset_no-limits-rs0.yml | 12 ++++++++++++ ...fulset_no-requests-no-limits-rs0-increased-oc.yml | 12 ++++++++++++ ...atefulset_no-requests-no-limits-rs0-increased.yml | 12 ++++++++++++ .../statefulset_no-requests-no-limits-rs0-oc.yml | 12 ++++++++++++ .../statefulset_no-requests-no-limits-rs0.yml | 12 ++++++++++++ .../statefulset_no-requests-rs0-increased-oc.yml | 12 ++++++++++++ .../statefulset_no-requests-rs0-increased.yml | 12 ++++++++++++ .../compare/statefulset_no-requests-rs0-oc.yml | 12 ++++++++++++ .../limits/compare/statefulset_no-requests-rs0.yml | 12 ++++++++++++ .../compare/statefulset_liveness-rs0-changed-oc.yml | 12 ++++++++++++ .../compare/statefulset_liveness-rs0-changed.yml | 12 ++++++++++++ .../liveness/compare/statefulset_liveness-rs0-oc.yml | 12 ++++++++++++ .../liveness/compare/statefulset_liveness-rs0.yml | 12 ++++++++++++ .../compare/statefulset_monitoring-cfg-oc.yml | 12 ++++++++++++ .../compare/statefulset_monitoring-cfg.yml | 12 ++++++++++++ .../compare/statefulset_monitoring-mongos-oc.yml | 11 +++++++++++ .../compare/statefulset_monitoring-mongos.yml | 11 +++++++++++ .../compare/statefulset_monitoring-rs0-no-pmm-oc.yml | 12 ++++++++++++ .../compare/statefulset_monitoring-rs0-no-pmm.yml | 12 ++++++++++++ .../compare/statefulset_monitoring-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_monitoring-rs0.yml | 12 ++++++++++++ .../compare/statefulset_nonvoting-rs0-nv-oc.yml | 12 ++++++++++++ .../compare/statefulset_nonvoting-rs0-nv.yml | 12 ++++++++++++ .../one-pod/compare/statefulset_one-pod-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_one-pod-rs0-secret-oc.yml | 12 ++++++++++++ .../compare/statefulset_one-pod-rs0-secret.yml | 12 ++++++++++++ .../one-pod/compare/statefulset_one-pod-rs0.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg-4-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-cfg.yml | 12 ++++++++++++ .../compare/statefulset_some-name-mongos.yml | 11 +++++++++++ .../compare/statefulset_some-name-rs0-4-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs1-4-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs1-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs1.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs2-4-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs2-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs2.yml | 12 ++++++++++++ .../pitr/compare/statefulset_some-name-rs0-oc.yml | 12 ++++++++++++ e2e-tests/pitr/compare/statefulset_some-name-rs0.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0.yml | 12 ++++++++++++ .../compare/statefulset_sec-context-rs0-changed.yml | 12 ++++++++++++ .../compare/statefulset_sec-context-rs0.yml | 12 ++++++++++++ .../compare/statefulset_cluster-ip-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_cluster-ip-rs0.yml | 12 ++++++++++++ .../compare/statefulset_local-balancer-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_local-balancer-rs0.yml | 12 ++++++++++++ .../compare/statefulset_node-port-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_node-port-rs0.yml | 12 ++++++++++++ .../statefulset_smart-update-rs0-arbiter-oc.yml | 12 ++++++++++++ .../compare/statefulset_smart-update-rs0-arbiter.yml | 12 ++++++++++++ .../compare/statefulset_smart-update-rs0-oc.yml | 12 ++++++++++++ .../compare/statefulset_smart-update-rs0.yml | 12 ++++++++++++ .../storage/compare/statefulset_emptydir-rs0-oc.yml | 12 ++++++++++++ .../storage/compare/statefulset_emptydir-rs0.yml | 12 ++++++++++++ .../storage/compare/statefulset_hostpath-rs0-oc.yml | 12 ++++++++++++ .../storage/compare/statefulset_hostpath-rs0.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-1110-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-1110.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-1120-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-1120.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-1130-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-1130.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-1140-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-1140.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-1150-oc.yml | 12 ++++++++++++ .../compare/statefulset_some-name-rs0-1150.yml | 12 ++++++++++++ .../compare/statefulset_minimal-cluster-rs0.yml | 12 ++++++++++++ .../statefulset_version-service-exact-rs0-oc.yml | 12 ++++++++++++ .../statefulset_version-service-exact-rs0.yml | 12 ++++++++++++ .../statefulset_version-service-latest-rs0-oc.yml | 12 ++++++++++++ .../statefulset_version-service-latest-rs0.yml | 12 ++++++++++++ .../statefulset_version-service-major-rs0-oc.yml | 12 ++++++++++++ .../statefulset_version-service-major-rs0.yml | 12 ++++++++++++ ...tatefulset_version-service-recommended-rs0-oc.yml | 12 ++++++++++++ .../statefulset_version-service-recommended-rs0.yml | 12 ++++++++++++ ...tatefulset_version-service-unreachable-rs0-oc.yml | 12 ++++++++++++ .../statefulset_version-service-unreachable-rs0.yml | 12 ++++++++++++ 128 files changed, 1526 insertions(+) diff --git a/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter-oc.yml b/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter-oc.yml index 6088ac9db7..89e0dff3b5 100644 --- a/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter-oc.yml +++ b/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter-oc.yml @@ -158,6 +158,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: arbiter + app.kubernetes.io/instance: arbiter-clusterip + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: arbiter-clusterip-mongodb-keyfile secret: diff --git a/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter.yml b/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter.yml index 7ee18a6b19..3b1dc0e5a6 100644 --- a/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter.yml +++ b/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter.yml @@ -154,6 +154,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: arbiter + app.kubernetes.io/instance: arbiter-clusterip + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: arbiter-clusterip-mongodb-keyfile secret: diff --git a/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter-oc.yml b/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter-oc.yml index 41e78e24b1..d57de79b2a 100644 --- a/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter-oc.yml +++ b/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter-oc.yml @@ -157,6 +157,18 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: arbiter + app.kubernetes.io/instance: arbiter + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: arbiter-mongodb-keyfile secret: diff --git a/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter.yml b/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter.yml index 88ab6ecd10..81b40b18c7 100644 --- a/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter.yml +++ b/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter.yml @@ -159,6 +159,18 @@ spec: securityContext: fsGroup: 1001 terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: arbiter + app.kubernetes.io/instance: arbiter + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: arbiter-mongodb-keyfile secret: diff --git a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg-oc.yml b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg-oc.yml index 7889faa4c1..b2210de8b4 100644 --- a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg-oc.yml +++ b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg-oc.yml @@ -196,6 +196,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg.yml b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg.yml index a310679b4e..4c115748e5 100644 --- a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg.yml +++ b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg.yml @@ -199,6 +199,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0-oc.yml index 4b0524ddbd..4a5b6b91e3 100644 --- a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0-oc.yml @@ -209,6 +209,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0.yml b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0.yml index f5f5c57958..3870743e73 100644 --- a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0.yml @@ -212,6 +212,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded-oc.yml b/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded-oc.yml index 7076872fb1..ecf4f40cee 100644 --- a/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded-oc.yml +++ b/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded-oc.yml @@ -196,6 +196,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded.yml b/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded.yml index b879b64eee..c72ec5cb2a 100644 --- a/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded.yml +++ b/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded.yml @@ -198,6 +198,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore-oc.yml b/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore-oc.yml index 4fa650caf1..c8fac90fd6 100644 --- a/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore-oc.yml +++ b/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore-oc.yml @@ -195,6 +195,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore.yml b/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore.yml index decbc1cd92..85989a62a1 100644 --- a/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore.yml +++ b/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore.yml @@ -197,6 +197,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-4-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-4-oc.yml index 706991286f..61b54b0686 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-4-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-4-oc.yml @@ -218,6 +218,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-oc.yml index 1b6962195e..e98f87396a 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-oc.yml @@ -217,6 +217,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg.yml index f291188a12..d9a98a7d60 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg.yml @@ -221,6 +221,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-4-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-4-oc.yml index b7ae3c8d97..167423e804 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-4-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-4-oc.yml @@ -168,6 +168,17 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongos + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-oc.yml index bb6c241ae1..290a4c4c7b 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-oc.yml @@ -167,6 +167,17 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongos + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-secret.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-secret.yml index 43d319a926..7b033e060b 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-secret.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-secret.yml @@ -168,6 +168,17 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongos + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos.yml index b7ae3c8d97..167423e804 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos.yml @@ -168,6 +168,17 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongos + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-4-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-4-oc.yml index ce0671d490..4a7834ed85 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-4-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-4-oc.yml @@ -212,6 +212,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-oc.yml index 811070d740..4a6f479248 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-oc.yml @@ -211,6 +211,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0.yml index 690776c354..302baf1536 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0.yml @@ -215,6 +215,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1-oc.yml index b77e2d6c76..f1037ef763 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1-oc.yml @@ -211,6 +211,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs1 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1.yml index 0ab1b9dd9f..128eb15ebe 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1.yml @@ -214,6 +214,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs1 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2-oc.yml index b8509a51e1..e980ae9718 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2-oc.yml @@ -221,6 +221,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs2 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2.yml index da7be99979..3206e98539 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2.yml @@ -224,6 +224,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs2 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/demand-backup/compare/statefulset_some-name-rs0-oc.yml index abec220c27..b0c7164a70 100644 --- a/e2e-tests/demand-backup/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/demand-backup/compare/statefulset_some-name-rs0-oc.yml @@ -208,6 +208,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup/compare/statefulset_some-name-rs0.yml b/e2e-tests/demand-backup/compare/statefulset_some-name-rs0.yml index d2a1b79a16..552f21b52d 100644 --- a/e2e-tests/demand-backup/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/demand-backup/compare/statefulset_some-name-rs0.yml @@ -211,6 +211,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-4-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-4-oc.yml index b5b749d1e1..da5a2868cc 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-4-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-4-oc.yml @@ -168,6 +168,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-oc.yml index ef488611ea..f02e0c3232 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-oc.yml @@ -167,6 +167,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg.yml index 056470ce3a..0f1bf6c5c6 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg.yml @@ -170,6 +170,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-4-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-4-oc.yml index b7ae3c8d97..167423e804 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-4-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-4-oc.yml @@ -168,6 +168,17 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongos + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-oc.yml index bb6c241ae1..290a4c4c7b 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-oc.yml @@ -167,6 +167,17 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongos + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos.yml index b7ae3c8d97..167423e804 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos.yml @@ -168,6 +168,17 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongos + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-4-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-4-oc.yml index 6f8d7e0203..57932a915e 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-4-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-4-oc.yml @@ -172,6 +172,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-oc.yml index 2822502864..6acf4c6b75 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-oc.yml @@ -171,6 +171,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0.yml index fa4929ece1..7fad526b16 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0.yml @@ -174,6 +174,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-4-oc.yml b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-4-oc.yml index 96960c0370..19b403d11f 100644 --- a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-4-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-4-oc.yml @@ -182,6 +182,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: another-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: another-name-mongodb-keyfile secret: diff --git a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-oc.yml b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-oc.yml index f2681ed43a..6a9dbb81e3 100644 --- a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-oc.yml @@ -181,6 +181,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: another-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: another-name-mongodb-keyfile secret: diff --git a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0.yml b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0.yml index 510561582c..1ac681c800 100644 --- a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0.yml +++ b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0.yml @@ -184,6 +184,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: another-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: another-name-mongodb-keyfile secret: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-rs0-oc.yml index 53a9df1a93..bb5776f123 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-rs0-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-rs0.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-rs0.yml index a60426e3d5..064e195281 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-rs0.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased-oc.yml index 6c8800707b..0907dcf200 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased-oc.yml @@ -165,6 +165,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased.yml b/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased.yml index d98b56f40d..1b0a5c1a91 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased.yml @@ -167,6 +167,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-rs0-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-rs0-oc.yml index e121182de9..ed3f503f1e 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-rs0-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-rs0-oc.yml @@ -165,6 +165,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-rs0.yml b/e2e-tests/limits/compare/statefulset_no-limits-rs0.yml index f9ba14e826..8a948f9320 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-rs0.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-rs0.yml @@ -167,6 +167,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased-oc.yml index 8d72a4d546..2ff25139a1 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased-oc.yml @@ -159,6 +159,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased.yml index 89f237af4f..bd46d7c487 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased.yml @@ -161,6 +161,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-oc.yml index 8d72a4d546..2ff25139a1 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-oc.yml @@ -159,6 +159,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0.yml index 89f237af4f..bd46d7c487 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0.yml @@ -161,6 +161,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased-oc.yml index edcd2501db..d1bf639b9a 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased-oc.yml @@ -166,6 +166,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased.yml b/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased.yml index 002d7aa90f..eba11def94 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased.yml @@ -168,6 +168,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-rs0-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-rs0-oc.yml index 27ba60589c..3451405d29 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-rs0-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-rs0-oc.yml @@ -166,6 +166,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-rs0.yml b/e2e-tests/limits/compare/statefulset_no-requests-rs0.yml index 666f6daf6e..a7796b5d4c 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-rs0.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-rs0.yml @@ -168,6 +168,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-mongodb-keyfile secret: diff --git a/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed-oc.yml b/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed-oc.yml index 1c49021682..fe046d0f29 100644 --- a/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed-oc.yml +++ b/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed-oc.yml @@ -208,6 +208,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: liveness + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: liveness-mongodb-keyfile secret: diff --git a/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed.yml b/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed.yml index d1d525ab1b..bf341e2f90 100644 --- a/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed.yml +++ b/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed.yml @@ -211,6 +211,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: liveness + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: liveness-mongodb-keyfile secret: diff --git a/e2e-tests/liveness/compare/statefulset_liveness-rs0-oc.yml b/e2e-tests/liveness/compare/statefulset_liveness-rs0-oc.yml index 43acc286a7..984b70b45d 100644 --- a/e2e-tests/liveness/compare/statefulset_liveness-rs0-oc.yml +++ b/e2e-tests/liveness/compare/statefulset_liveness-rs0-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: liveness + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: liveness-mongodb-keyfile secret: diff --git a/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml b/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml index 189de4d86f..7d88451be4 100644 --- a/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml +++ b/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: liveness + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: liveness-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg-oc.yml index 4d55bd027d..6e521a8bb1 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg-oc.yml @@ -288,6 +288,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg.yml index bf1cd8cad6..47e1ca202d 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg.yml @@ -290,6 +290,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos-oc.yml index b07686a3b3..3fe36be2e8 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos-oc.yml @@ -297,6 +297,17 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongos + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos.yml index b07686a3b3..3fe36be2e8 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos.yml @@ -297,6 +297,17 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongos + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm-oc.yml index e02a6dbd2a..805badb1a2 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm-oc.yml @@ -148,6 +148,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm.yml index 82cd94dffd..f5b90e2b05 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm.yml @@ -150,6 +150,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-oc.yml index 72bbce334c..efe6970cca 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-oc.yml @@ -276,6 +276,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0.yml index 3905751287..2cafddd9d5 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0.yml @@ -278,6 +278,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv-oc.yml b/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv-oc.yml index abb3175040..c55e1abd21 100644 --- a/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv-oc.yml +++ b/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv-oc.yml @@ -169,6 +169,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: nonVoting + app.kubernetes.io/instance: nonvoting + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: nonvoting-mongodb-keyfile secret: diff --git a/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv.yml b/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv.yml index f8c7722a16..f7bf29b338 100644 --- a/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv.yml +++ b/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv.yml @@ -171,6 +171,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: nonVoting + app.kubernetes.io/instance: nonvoting + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: nonvoting-mongodb-keyfile secret: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-oc.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-oc.yml index bb34e38592..3afaf8fe7b 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-oc.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-oc.yml @@ -216,6 +216,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: one-pod-mongodb-keyfile secret: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret-oc.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret-oc.yml index 5c41ecd51d..3cf549c7ec 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret-oc.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret-oc.yml @@ -216,6 +216,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: one-pod-mongodb-keyfile secret: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret.yml index 791687b1fc..5f1c56af90 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret.yml @@ -219,6 +219,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: one-pod-mongodb-keyfile secret: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0.yml index 4ae7ea5f89..0a04231f85 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0.yml @@ -219,6 +219,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: one-pod-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-4-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-4-oc.yml index 706991286f..61b54b0686 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-4-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-4-oc.yml @@ -218,6 +218,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-oc.yml index 1b6962195e..e98f87396a 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-oc.yml @@ -217,6 +217,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg.yml index f291188a12..d9a98a7d60 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg.yml @@ -221,6 +221,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: cfg + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: cfg + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-mongos.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-mongos.yml index ac03b3eba2..927cd0eef0 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-mongos.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-mongos.yml @@ -165,6 +165,17 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongos + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-4-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-4-oc.yml index ce0671d490..4a7834ed85 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-4-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-4-oc.yml @@ -212,6 +212,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-oc.yml index 811070d740..4a6f479248 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-oc.yml @@ -211,6 +211,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0.yml index 690776c354..302baf1536 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0.yml @@ -215,6 +215,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-4-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-4-oc.yml index b77e2d6c76..f1037ef763 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-4-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-4-oc.yml @@ -211,6 +211,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs1 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-oc.yml index 00b3bc3155..3623a28859 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-oc.yml @@ -209,6 +209,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs1 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1.yml index 0ab1b9dd9f..128eb15ebe 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1.yml @@ -214,6 +214,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs1 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-4-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-4-oc.yml index b8509a51e1..e980ae9718 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-4-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-4-oc.yml @@ -221,6 +221,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs2 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-oc.yml index 4f3c148d86..c3e2aef4d9 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-oc.yml @@ -219,6 +219,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs2 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2.yml index da7be99979..3206e98539 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2.yml @@ -224,6 +224,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs2 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/pitr/compare/statefulset_some-name-rs0-oc.yml index abec220c27..b0c7164a70 100644 --- a/e2e-tests/pitr/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/pitr/compare/statefulset_some-name-rs0-oc.yml @@ -208,6 +208,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr/compare/statefulset_some-name-rs0.yml b/e2e-tests/pitr/compare/statefulset_some-name-rs0.yml index d2a1b79a16..552f21b52d 100644 --- a/e2e-tests/pitr/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/pitr/compare/statefulset_some-name-rs0.yml @@ -211,6 +211,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0-oc.yml index 53a9df1a93..bb5776f123 100644 --- a/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0.yml b/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0.yml index a60426e3d5..064e195281 100644 --- a/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0-oc.yml index 7c2decf5c8..0c66650753 100644 --- a/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0-oc.yml @@ -211,6 +211,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0.yml b/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0.yml index 2ff8f76768..e5cb82fd41 100644 --- a/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0.yml @@ -214,6 +214,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-rs0-changed.yml b/e2e-tests/security-context/compare/statefulset_sec-context-rs0-changed.yml index 623536fb09..0ec1768980 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-rs0-changed.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-rs0-changed.yml @@ -218,6 +218,18 @@ spec: serviceAccount: percona-server-mongodb-operator-workload serviceAccountName: percona-server-mongodb-operator-workload terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: sec-context-mongodb-keyfile secret: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-rs0.yml b/e2e-tests/security-context/compare/statefulset_sec-context-rs0.yml index 6a216018c8..a32d1803d9 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-rs0.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-rs0.yml @@ -169,6 +169,18 @@ spec: serviceAccount: percona-server-mongodb-operator-workload serviceAccountName: percona-server-mongodb-operator-workload terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: sec-context-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0-oc.yml b/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0-oc.yml index a05c3ca493..03c74bd69e 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0-oc.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0-oc.yml @@ -195,6 +195,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: cluster-ip + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: cluster-ip-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0.yml b/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0.yml index 8381b7f5ce..cc31c1fbfb 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0.yml @@ -198,6 +198,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: cluster-ip + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: cluster-ip-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0-oc.yml b/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0-oc.yml index 515d7654a6..97b58a680a 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0-oc.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0-oc.yml @@ -195,6 +195,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: local-balancer + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: local-balancer-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0.yml b/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0.yml index bc6511c1ad..2701c4ef11 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0.yml @@ -198,6 +198,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: local-balancer + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: local-balancer-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0-oc.yml b/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0-oc.yml index a743068e7d..4d09e87d20 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0-oc.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0-oc.yml @@ -195,6 +195,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: node-port + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: node-port-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0.yml b/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0.yml index f8d1f7a2c8..0a514eb141 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0.yml @@ -198,6 +198,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: node-port + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: node-port-mongodb-keyfile secret: diff --git a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter-oc.yml b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter-oc.yml index ef76b0baca..621daea995 100644 --- a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter-oc.yml +++ b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter-oc.yml @@ -158,6 +158,18 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: arbiter + app.kubernetes.io/instance: smart-update + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: smart-update-mongodb-keyfile secret: diff --git a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml index 79caa07da0..1132a5d8bd 100644 --- a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml +++ b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml @@ -160,6 +160,18 @@ spec: securityContext: fsGroup: 1001 terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: arbiter + app.kubernetes.io/instance: smart-update + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: smart-update-mongodb-keyfile secret: diff --git a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-oc.yml b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-oc.yml index d4f2f70202..71396da42b 100644 --- a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-oc.yml +++ b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: smart-update + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: smart-update-mongodb-keyfile secret: diff --git a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml index a5af0087b2..206329485e 100644 --- a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml +++ b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: smart-update + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: smart-update-mongodb-keyfile secret: diff --git a/e2e-tests/storage/compare/statefulset_emptydir-rs0-oc.yml b/e2e-tests/storage/compare/statefulset_emptydir-rs0-oc.yml index d2edda1464..c1eca1c311 100644 --- a/e2e-tests/storage/compare/statefulset_emptydir-rs0-oc.yml +++ b/e2e-tests/storage/compare/statefulset_emptydir-rs0-oc.yml @@ -147,6 +147,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: emptydir + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: emptydir-mongodb-keyfile secret: diff --git a/e2e-tests/storage/compare/statefulset_emptydir-rs0.yml b/e2e-tests/storage/compare/statefulset_emptydir-rs0.yml index 111bf452a7..2bfb3be1f9 100644 --- a/e2e-tests/storage/compare/statefulset_emptydir-rs0.yml +++ b/e2e-tests/storage/compare/statefulset_emptydir-rs0.yml @@ -161,6 +161,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: emptydir + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: emptydir-mongodb-keyfile secret: diff --git a/e2e-tests/storage/compare/statefulset_hostpath-rs0-oc.yml b/e2e-tests/storage/compare/statefulset_hostpath-rs0-oc.yml index 82dbd55749..baa5a6e35a 100644 --- a/e2e-tests/storage/compare/statefulset_hostpath-rs0-oc.yml +++ b/e2e-tests/storage/compare/statefulset_hostpath-rs0-oc.yml @@ -147,6 +147,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: hostpath + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: hostpath-mongodb-keyfile secret: diff --git a/e2e-tests/storage/compare/statefulset_hostpath-rs0.yml b/e2e-tests/storage/compare/statefulset_hostpath-rs0.yml index a013b82dab..1e57e24bfc 100644 --- a/e2e-tests/storage/compare/statefulset_hostpath-rs0.yml +++ b/e2e-tests/storage/compare/statefulset_hostpath-rs0.yml @@ -161,6 +161,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: hostpath + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: hostpath-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110-oc.yml index 6dc6c3ae6a..ed97b0a7ab 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110-oc.yml @@ -168,6 +168,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110.yml index 8b3a75f4af..78320ff016 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110.yml @@ -170,6 +170,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120-oc.yml index eb5b8dfcbf..d1c4791322 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120-oc.yml @@ -157,6 +157,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120.yml index 0446214c45..88bc55574d 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120.yml @@ -159,6 +159,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130-oc.yml index 3953e20250..c8e5d880e2 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130-oc.yml @@ -158,6 +158,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130.yml index 519dfe2780..394f9264eb 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140-oc.yml index ef0a65c77d..032aeac19e 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140.yml index e667272881..3438bb513b 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150-oc.yml index 1bd744c220..fbbb126037 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150.yml index ec6286e35e..9896529fea 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_minimal-cluster-rs0.yml b/e2e-tests/version-service/compare/statefulset_minimal-cluster-rs0.yml index 9ac1a90aed..d79777eb00 100644 --- a/e2e-tests/version-service/compare/statefulset_minimal-cluster-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_minimal-cluster-rs0.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: minimal-cluster-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0-oc.yml b/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0-oc.yml index 90d77d767f..ceeb9e7d3a 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0-oc.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: version-service-exact + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-exact-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0.yml b/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0.yml index 7c74b0b5af..04ae13e952 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: version-service-exact + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-exact-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0-oc.yml b/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0-oc.yml index 12120a73c1..0d290d65d8 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0-oc.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: version-service-latest + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-latest-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0.yml b/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0.yml index 4131c55d36..58f2ddb8a6 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: version-service-latest + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-latest-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-major-rs0-oc.yml b/e2e-tests/version-service/compare/statefulset_version-service-major-rs0-oc.yml index 304ebc9864..acbde63a7e 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-major-rs0-oc.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-major-rs0-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: version-service-major + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-major-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-major-rs0.yml b/e2e-tests/version-service/compare/statefulset_version-service-major-rs0.yml index dd93ae0e96..4565a6de6a 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-major-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-major-rs0.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: version-service-major + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-major-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0-oc.yml b/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0-oc.yml index 7c4c5f7abc..0c49867173 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0-oc.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: version-service-recommended + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-recommended-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0.yml b/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0.yml index 42ec179fb9..de030d1000 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: version-service-recommended + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-recommended-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0-oc.yml b/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0-oc.yml index 8cbd2672a0..ee425253a0 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0-oc.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0-oc.yml @@ -160,6 +160,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: version-service-unreachable + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-unreachable-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0.yml b/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0.yml index b10e5507dc..9e3430ff69 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0.yml @@ -162,6 +162,18 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 + topologySpreadConstraints: + - labelSelector: + matchLabels: + app.kubernetes.io/component: mongod + app.kubernetes.io/instance: version-service-unreachable + app.kubernetes.io/managed-by: percona-server-mongodb-operator + app.kubernetes.io/name: percona-server-mongodb + app.kubernetes.io/part-of: percona-server-mongodb + app.kubernetes.io/replset: rs0 + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-unreachable-mongodb-keyfile secret: From 12986a570f272127589018224edf9c88addad1ef Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Mon, 7 Aug 2023 20:46:57 +0300 Subject: [PATCH 3/8] fix defaults --- pkg/apis/psmdb/v1/psmdb_defaults.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkg/apis/psmdb/v1/psmdb_defaults.go b/pkg/apis/psmdb/v1/psmdb_defaults.go index a572f3ae89..af35d66096 100644 --- a/pkg/apis/psmdb/v1/psmdb_defaults.go +++ b/pkg/apis/psmdb/v1/psmdb_defaults.go @@ -285,7 +285,7 @@ func (cr *PerconaServerMongoDB) CheckNSetDefaults(platform version.Platform, log cr.Spec.Sharding.Mongos.ReadinessProbe.FailureThreshold = 3 } - cr.Spec.Sharding.Mongos.reconcileOpts() + cr.Spec.Sharding.Mongos.reconcileOpts(cr) if err := cr.Spec.Sharding.Mongos.Configuration.SetDefaults(); err != nil { return errors.Wrap(err, "failed to set configuration defaults") @@ -574,10 +574,10 @@ func (rs *ReplsetSpec) SetDefaults(platform version.Platform, cr *PerconaServerM rs.Expose.ExposeType = corev1.ServiceTypeClusterIP } - rs.MultiAZ.reconcileOpts() + rs.MultiAZ.reconcileOpts(cr) if rs.Arbiter.Enabled { - rs.Arbiter.MultiAZ.reconcileOpts() + rs.Arbiter.MultiAZ.reconcileOpts(cr) } if !cr.Spec.UnsafeConf && cr.DeletionTimestamp == nil { @@ -710,7 +710,7 @@ func (nv *NonVotingSpec) SetDefaults(cr *PerconaServerMongoDB, rs *ReplsetSpec) nv.ServiceAccountName = WorkloadSA } - nv.MultiAZ.reconcileOpts() + nv.MultiAZ.reconcileOpts(cr) if nv.ContainerSecurityContext == nil { nv.ContainerSecurityContext = rs.ContainerSecurityContext @@ -757,9 +757,9 @@ func (rs *ReplsetSpec) setSafeDefaults(log logr.Logger) { } } -func (m *MultiAZ) reconcileOpts() { +func (m *MultiAZ) reconcileOpts(cr *PerconaServerMongoDB) { m.reconcileAffinityOpts() - m.reconcileTopologySpreadConstraints() + m.reconcileTopologySpreadConstraints(cr) if m.PodDisruptionBudget == nil { defaultMaxUnavailable := intstr.FromInt(1) @@ -803,7 +803,11 @@ func (m *MultiAZ) reconcileAffinityOpts() { } } -func (m *MultiAZ) reconcileTopologySpreadConstraints() { +func (m *MultiAZ) reconcileTopologySpreadConstraints(cr *PerconaServerMongoDB) { + if cr.CompareVersion("1.15.0") < 0 { + return + } + if len(m.TopologySpreadConstraints) == 0 { m.TopologySpreadConstraints = []corev1.TopologySpreadConstraint{ {}, // this line ensures that the slice contains at least one element From d51f76cd149fb5165439e7cafa2de9b644da657c Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Mon, 7 Aug 2023 23:20:27 +0300 Subject: [PATCH 4/8] fix `upgrade-consistency` test --- .../compare/statefulset_some-name-rs0-1110.yml | 12 ------------ .../compare/statefulset_some-name-rs0-1120-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0-1120.yml | 12 ------------ .../compare/statefulset_some-name-rs0-1130-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0-1130.yml | 12 ------------ .../compare/statefulset_some-name-rs0-1140-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0-1140.yml | 12 ------------ 7 files changed, 84 deletions(-) diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110.yml index 78320ff016..8b3a75f4af 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110.yml @@ -170,18 +170,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120-oc.yml index d1c4791322..eb5b8dfcbf 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120-oc.yml @@ -157,18 +157,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120.yml index 88bc55574d..0446214c45 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1120.yml @@ -159,18 +159,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130-oc.yml index c8e5d880e2..3953e20250 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130-oc.yml @@ -158,18 +158,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130.yml index 394f9264eb..519dfe2780 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1130.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140-oc.yml index 032aeac19e..ef0a65c77d 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140.yml index 3438bb513b..e667272881 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1140.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: From 249b7a2070366a5ae038c63874212d4d22f0079e Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Wed, 9 Aug 2023 16:26:26 +0300 Subject: [PATCH 5/8] update `cr.yaml` --- deploy/cr.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/deploy/cr.yaml b/deploy/cr.yaml index d307efdce3..0c73f85a54 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -49,6 +49,13 @@ spec: - name: rs0 size: 3 # terminationGracePeriodSeconds: 300 +# topologySpreadConstraints: +# - labelSelector: +# matchLabels: +# app.kubernetes.io/name: percona-server-mongodb +# maxSkew: 1 +# topologyKey: kubernetes.io/hostname +# whenUnsatisfiable: DoNotSchedule # externalNodes: # - host: 34.124.76.90 # - host: 34.124.76.91 @@ -286,6 +293,13 @@ spec: configsvrReplSet: size: 3 # terminationGracePeriodSeconds: 300 +# topologySpreadConstraints: +# - labelSelector: +# matchLabels: +# app.kubernetes.io/name: percona-server-mongodb +# maxSkew: 1 +# topologyKey: kubernetes.io/hostname +# whenUnsatisfiable: DoNotSchedule # externalNodes: # - host: 34.124.76.93 # - host: 34.124.76.94 @@ -378,6 +392,13 @@ spec: mongos: size: 3 # terminationGracePeriodSeconds: 300 +# topologySpreadConstraints: +# - labelSelector: +# matchLabels: +# app.kubernetes.io/name: percona-server-mongodb +# maxSkew: 1 +# topologyKey: kubernetes.io/hostname +# whenUnsatisfiable: DoNotSchedule # # for more configuration fields refer to https://docs.mongodb.com/manual/reference/configuration-options/ # configuration: | # systemLog: From c21522a52f18146798ae35c76411fb639fcc8918 Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Fri, 18 Aug 2023 17:37:01 +0300 Subject: [PATCH 6/8] Revert "fix tests" This reverts commit 6796ce71e62001b334a934a0fee795a25c9f4f1b. --- .../statefulset_arbiter-clusterip-rs0-arbiter-oc.yml | 12 ------------ .../statefulset_arbiter-clusterip-rs0-arbiter.yml | 12 ------------ .../compare/statefulset_arbiter-rs0-arbiter-oc.yml | 12 ------------ .../compare/statefulset_arbiter-rs0-arbiter.yml | 12 ------------ .../compare/statefulset_some-name-cfg-oc.yml | 12 ------------ .../compare/statefulset_some-name-cfg.yml | 12 ------------ .../compare/statefulset_some-name-rs0-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0.yml | 12 ------------ .../statefulset_some-name-rs0_restore_sharded-oc.yml | 12 ------------ .../statefulset_some-name-rs0_restore_sharded.yml | 12 ------------ .../compare/statefulset_some-name-rs0_restore-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0_restore.yml | 12 ------------ .../compare/statefulset_some-name-cfg-4-oc.yml | 12 ------------ .../compare/statefulset_some-name-cfg-oc.yml | 12 ------------ .../compare/statefulset_some-name-cfg.yml | 12 ------------ .../compare/statefulset_some-name-mongos-4-oc.yml | 11 ----------- .../compare/statefulset_some-name-mongos-oc.yml | 11 ----------- .../compare/statefulset_some-name-mongos-secret.yml | 11 ----------- .../compare/statefulset_some-name-mongos.yml | 11 ----------- .../compare/statefulset_some-name-rs0-4-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0.yml | 12 ------------ .../compare/statefulset_some-name-rs1-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs1.yml | 12 ------------ .../compare/statefulset_some-name-rs2-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs2.yml | 12 ------------ .../compare/statefulset_some-name-rs0-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0.yml | 12 ------------ .../compare/statefulset_some-name-cfg-4-oc.yml | 12 ------------ .../compare/statefulset_some-name-cfg-oc.yml | 12 ------------ .../compare/statefulset_some-name-cfg.yml | 12 ------------ .../compare/statefulset_some-name-mongos-4-oc.yml | 11 ----------- .../compare/statefulset_some-name-mongos-oc.yml | 11 ----------- .../compare/statefulset_some-name-mongos.yml | 11 ----------- .../compare/statefulset_some-name-rs0-4-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0.yml | 12 ------------ .../compare/statefulset_another-name-rs0-4-oc.yml | 12 ------------ .../compare/statefulset_another-name-rs0-oc.yml | 12 ------------ .../compare/statefulset_another-name-rs0.yml | 12 ------------ .../compare/statefulset_some-name-rs0-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0.yml | 12 ------------ .../statefulset_no-limits-rs0-increased-oc.yml | 12 ------------ .../compare/statefulset_no-limits-rs0-increased.yml | 12 ------------ .../limits/compare/statefulset_no-limits-rs0-oc.yml | 12 ------------ .../limits/compare/statefulset_no-limits-rs0.yml | 12 ------------ ...fulset_no-requests-no-limits-rs0-increased-oc.yml | 12 ------------ ...atefulset_no-requests-no-limits-rs0-increased.yml | 12 ------------ .../statefulset_no-requests-no-limits-rs0-oc.yml | 12 ------------ .../statefulset_no-requests-no-limits-rs0.yml | 12 ------------ .../statefulset_no-requests-rs0-increased-oc.yml | 12 ------------ .../statefulset_no-requests-rs0-increased.yml | 12 ------------ .../compare/statefulset_no-requests-rs0-oc.yml | 12 ------------ .../limits/compare/statefulset_no-requests-rs0.yml | 12 ------------ .../compare/statefulset_liveness-rs0-changed-oc.yml | 12 ------------ .../compare/statefulset_liveness-rs0-changed.yml | 12 ------------ .../liveness/compare/statefulset_liveness-rs0-oc.yml | 12 ------------ .../liveness/compare/statefulset_liveness-rs0.yml | 12 ------------ .../compare/statefulset_monitoring-cfg-oc.yml | 12 ------------ .../compare/statefulset_monitoring-cfg.yml | 12 ------------ .../compare/statefulset_monitoring-mongos-oc.yml | 11 ----------- .../compare/statefulset_monitoring-mongos.yml | 11 ----------- .../compare/statefulset_monitoring-rs0-no-pmm-oc.yml | 12 ------------ .../compare/statefulset_monitoring-rs0-no-pmm.yml | 12 ------------ .../compare/statefulset_monitoring-rs0-oc.yml | 12 ------------ .../compare/statefulset_monitoring-rs0.yml | 12 ------------ .../compare/statefulset_nonvoting-rs0-nv-oc.yml | 12 ------------ .../compare/statefulset_nonvoting-rs0-nv.yml | 12 ------------ .../one-pod/compare/statefulset_one-pod-rs0-oc.yml | 12 ------------ .../compare/statefulset_one-pod-rs0-secret-oc.yml | 12 ------------ .../compare/statefulset_one-pod-rs0-secret.yml | 12 ------------ .../one-pod/compare/statefulset_one-pod-rs0.yml | 12 ------------ .../compare/statefulset_some-name-cfg-4-oc.yml | 12 ------------ .../compare/statefulset_some-name-cfg-oc.yml | 12 ------------ .../compare/statefulset_some-name-cfg.yml | 12 ------------ .../compare/statefulset_some-name-mongos.yml | 11 ----------- .../compare/statefulset_some-name-rs0-4-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0.yml | 12 ------------ .../compare/statefulset_some-name-rs1-4-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs1-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs1.yml | 12 ------------ .../compare/statefulset_some-name-rs2-4-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs2-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs2.yml | 12 ------------ .../pitr/compare/statefulset_some-name-rs0-oc.yml | 12 ------------ e2e-tests/pitr/compare/statefulset_some-name-rs0.yml | 12 ------------ .../compare/statefulset_some-name-rs0-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0.yml | 12 ------------ .../compare/statefulset_some-name-rs0-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0.yml | 12 ------------ .../compare/statefulset_sec-context-rs0-changed.yml | 12 ------------ .../compare/statefulset_sec-context-rs0.yml | 12 ------------ .../compare/statefulset_cluster-ip-rs0-oc.yml | 12 ------------ .../compare/statefulset_cluster-ip-rs0.yml | 12 ------------ .../compare/statefulset_local-balancer-rs0-oc.yml | 12 ------------ .../compare/statefulset_local-balancer-rs0.yml | 12 ------------ .../compare/statefulset_node-port-rs0-oc.yml | 12 ------------ .../compare/statefulset_node-port-rs0.yml | 12 ------------ .../statefulset_smart-update-rs0-arbiter-oc.yml | 12 ------------ .../compare/statefulset_smart-update-rs0-arbiter.yml | 12 ------------ .../compare/statefulset_smart-update-rs0-oc.yml | 12 ------------ .../compare/statefulset_smart-update-rs0.yml | 12 ------------ .../storage/compare/statefulset_emptydir-rs0-oc.yml | 12 ------------ .../storage/compare/statefulset_emptydir-rs0.yml | 12 ------------ .../storage/compare/statefulset_hostpath-rs0-oc.yml | 12 ------------ .../storage/compare/statefulset_hostpath-rs0.yml | 12 ------------ .../compare/statefulset_some-name-rs0-1110-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0-1150-oc.yml | 12 ------------ .../compare/statefulset_some-name-rs0-1150.yml | 12 ------------ .../compare/statefulset_minimal-cluster-rs0.yml | 12 ------------ .../statefulset_version-service-exact-rs0-oc.yml | 12 ------------ .../statefulset_version-service-exact-rs0.yml | 12 ------------ .../statefulset_version-service-latest-rs0-oc.yml | 12 ------------ .../statefulset_version-service-latest-rs0.yml | 12 ------------ .../statefulset_version-service-major-rs0-oc.yml | 12 ------------ .../statefulset_version-service-major-rs0.yml | 12 ------------ ...tatefulset_version-service-recommended-rs0-oc.yml | 12 ------------ .../statefulset_version-service-recommended-rs0.yml | 12 ------------ ...tatefulset_version-service-unreachable-rs0-oc.yml | 12 ------------ .../statefulset_version-service-unreachable-rs0.yml | 12 ------------ 121 files changed, 1442 deletions(-) diff --git a/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter-oc.yml b/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter-oc.yml index 89e0dff3b5..6088ac9db7 100644 --- a/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter-oc.yml +++ b/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter-oc.yml @@ -158,18 +158,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: arbiter - app.kubernetes.io/instance: arbiter-clusterip - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: arbiter-clusterip-mongodb-keyfile secret: diff --git a/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter.yml b/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter.yml index 3b1dc0e5a6..7ee18a6b19 100644 --- a/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter.yml +++ b/e2e-tests/arbiter/compare/statefulset_arbiter-clusterip-rs0-arbiter.yml @@ -154,18 +154,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: arbiter - app.kubernetes.io/instance: arbiter-clusterip - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: arbiter-clusterip-mongodb-keyfile secret: diff --git a/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter-oc.yml b/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter-oc.yml index d57de79b2a..41e78e24b1 100644 --- a/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter-oc.yml +++ b/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter-oc.yml @@ -157,18 +157,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: arbiter - app.kubernetes.io/instance: arbiter - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: arbiter-mongodb-keyfile secret: diff --git a/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter.yml b/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter.yml index 81b40b18c7..88ab6ecd10 100644 --- a/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter.yml +++ b/e2e-tests/arbiter/compare/statefulset_arbiter-rs0-arbiter.yml @@ -159,18 +159,6 @@ spec: securityContext: fsGroup: 1001 terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: arbiter - app.kubernetes.io/instance: arbiter - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: arbiter-mongodb-keyfile secret: diff --git a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg-oc.yml b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg-oc.yml index b2210de8b4..7889faa4c1 100644 --- a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg-oc.yml +++ b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg-oc.yml @@ -196,18 +196,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg.yml b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg.yml index 4c115748e5..a310679b4e 100644 --- a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg.yml +++ b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-cfg.yml @@ -199,18 +199,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0-oc.yml index 4a5b6b91e3..4b0524ddbd 100644 --- a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0-oc.yml @@ -209,18 +209,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0.yml b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0.yml index 3870743e73..f5f5c57958 100644 --- a/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/data-at-rest-encryption/compare/statefulset_some-name-rs0.yml @@ -212,18 +212,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded-oc.yml b/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded-oc.yml index ecf4f40cee..7076872fb1 100644 --- a/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded-oc.yml +++ b/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded-oc.yml @@ -196,18 +196,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded.yml b/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded.yml index c72ec5cb2a..b879b64eee 100644 --- a/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded.yml +++ b/e2e-tests/demand-backup-physical-sharded/compare/statefulset_some-name-rs0_restore_sharded.yml @@ -198,18 +198,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore-oc.yml b/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore-oc.yml index c8fac90fd6..4fa650caf1 100644 --- a/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore-oc.yml +++ b/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore-oc.yml @@ -195,18 +195,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore.yml b/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore.yml index 85989a62a1..decbc1cd92 100644 --- a/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore.yml +++ b/e2e-tests/demand-backup-physical/compare/statefulset_some-name-rs0_restore.yml @@ -197,18 +197,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-4-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-4-oc.yml index 61b54b0686..706991286f 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-4-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-4-oc.yml @@ -218,18 +218,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-oc.yml index e98f87396a..1b6962195e 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg-oc.yml @@ -217,18 +217,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg.yml index d9a98a7d60..f291188a12 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-cfg.yml @@ -221,18 +221,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-4-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-4-oc.yml index 167423e804..b7ae3c8d97 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-4-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-4-oc.yml @@ -168,17 +168,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongos - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-oc.yml index 290a4c4c7b..bb6c241ae1 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-oc.yml @@ -167,17 +167,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongos - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-secret.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-secret.yml index 7b033e060b..43d319a926 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-secret.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos-secret.yml @@ -168,17 +168,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongos - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos.yml index 167423e804..b7ae3c8d97 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-mongos.yml @@ -168,17 +168,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongos - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-4-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-4-oc.yml index 4a7834ed85..ce0671d490 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-4-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-4-oc.yml @@ -212,18 +212,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-oc.yml index 4a6f479248..811070d740 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0-oc.yml @@ -211,18 +211,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0.yml index 302baf1536..690776c354 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs0.yml @@ -215,18 +215,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1-oc.yml index f1037ef763..b77e2d6c76 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1-oc.yml @@ -211,18 +211,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs1 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1.yml index 128eb15ebe..0ab1b9dd9f 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs1.yml @@ -214,18 +214,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs1 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2-oc.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2-oc.yml index e980ae9718..b8509a51e1 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2-oc.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2-oc.yml @@ -221,18 +221,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs2 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2.yml b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2.yml index 3206e98539..da7be99979 100644 --- a/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2.yml +++ b/e2e-tests/demand-backup-sharded/compare/statefulset_some-name-rs2.yml @@ -224,18 +224,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs2 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/demand-backup/compare/statefulset_some-name-rs0-oc.yml index b0c7164a70..abec220c27 100644 --- a/e2e-tests/demand-backup/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/demand-backup/compare/statefulset_some-name-rs0-oc.yml @@ -208,18 +208,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/demand-backup/compare/statefulset_some-name-rs0.yml b/e2e-tests/demand-backup/compare/statefulset_some-name-rs0.yml index 552f21b52d..d2a1b79a16 100644 --- a/e2e-tests/demand-backup/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/demand-backup/compare/statefulset_some-name-rs0.yml @@ -211,18 +211,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-4-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-4-oc.yml index da5a2868cc..b5b749d1e1 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-4-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-4-oc.yml @@ -168,18 +168,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-oc.yml index f02e0c3232..ef488611ea 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg-oc.yml @@ -167,18 +167,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg.yml index 0f1bf6c5c6..056470ce3a 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-cfg.yml @@ -170,18 +170,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-4-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-4-oc.yml index 167423e804..b7ae3c8d97 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-4-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-4-oc.yml @@ -168,17 +168,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongos - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-oc.yml index 290a4c4c7b..bb6c241ae1 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos-oc.yml @@ -167,17 +167,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongos - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos.yml index 167423e804..b7ae3c8d97 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-mongos.yml @@ -168,17 +168,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongos - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-4-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-4-oc.yml index 57932a915e..6f8d7e0203 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-4-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-4-oc.yml @@ -172,18 +172,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-oc.yml index 6acf4c6b75..2822502864 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0-oc.yml @@ -171,18 +171,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0.yml b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0.yml index 7fad526b16..fa4929ece1 100644 --- a/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/expose-sharded/compare/statefulset_some-name-rs0.yml @@ -174,18 +174,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-4-oc.yml b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-4-oc.yml index 6979da04ba..c628e6bed8 100644 --- a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-4-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-4-oc.yml @@ -182,18 +182,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 300 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: another-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: another-name-mongodb-keyfile secret: diff --git a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-oc.yml b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-oc.yml index 643a4ccf07..9dfff29d0d 100644 --- a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0-oc.yml @@ -181,18 +181,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 300 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: another-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: another-name-mongodb-keyfile secret: diff --git a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0.yml b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0.yml index ae056c06b8..1784c11a99 100644 --- a/e2e-tests/init-deploy/compare/statefulset_another-name-rs0.yml +++ b/e2e-tests/init-deploy/compare/statefulset_another-name-rs0.yml @@ -184,18 +184,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 300 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: another-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: another-name-mongodb-keyfile secret: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-rs0-oc.yml index bb5776f123..53a9df1a93 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-rs0-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-rs0.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-rs0.yml index 064e195281..a60426e3d5 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-rs0.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased-oc.yml index 0907dcf200..6c8800707b 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased-oc.yml @@ -165,18 +165,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-limits - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased.yml b/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased.yml index 1b0a5c1a91..d98b56f40d 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-rs0-increased.yml @@ -167,18 +167,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-limits - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-rs0-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-rs0-oc.yml index ed3f503f1e..e121182de9 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-rs0-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-rs0-oc.yml @@ -165,18 +165,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-limits - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-rs0.yml b/e2e-tests/limits/compare/statefulset_no-limits-rs0.yml index 8a948f9320..f9ba14e826 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-rs0.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-rs0.yml @@ -167,18 +167,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-limits - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased-oc.yml index 2ff25139a1..8d72a4d546 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased-oc.yml @@ -159,18 +159,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-requests-no-limits - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased.yml index bd46d7c487..89f237af4f 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-increased.yml @@ -161,18 +161,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-requests-no-limits - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-oc.yml index 2ff25139a1..8d72a4d546 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0-oc.yml @@ -159,18 +159,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-requests-no-limits - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0.yml index bd46d7c487..89f237af4f 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-rs0.yml @@ -161,18 +161,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-requests-no-limits - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-no-limits-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased-oc.yml index d1bf639b9a..edcd2501db 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased-oc.yml @@ -166,18 +166,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-requests - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased.yml b/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased.yml index eba11def94..002d7aa90f 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-rs0-increased.yml @@ -168,18 +168,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-requests - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-rs0-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-rs0-oc.yml index 3451405d29..27ba60589c 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-rs0-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-rs0-oc.yml @@ -166,18 +166,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-requests - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-mongodb-keyfile secret: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-rs0.yml b/e2e-tests/limits/compare/statefulset_no-requests-rs0.yml index a7796b5d4c..666f6daf6e 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-rs0.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-rs0.yml @@ -168,18 +168,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: no-requests - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: no-requests-mongodb-keyfile secret: diff --git a/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed-oc.yml b/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed-oc.yml index fe046d0f29..1c49021682 100644 --- a/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed-oc.yml +++ b/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed-oc.yml @@ -208,18 +208,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: liveness - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: liveness-mongodb-keyfile secret: diff --git a/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed.yml b/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed.yml index bf341e2f90..d1d525ab1b 100644 --- a/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed.yml +++ b/e2e-tests/liveness/compare/statefulset_liveness-rs0-changed.yml @@ -211,18 +211,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: liveness - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: liveness-mongodb-keyfile secret: diff --git a/e2e-tests/liveness/compare/statefulset_liveness-rs0-oc.yml b/e2e-tests/liveness/compare/statefulset_liveness-rs0-oc.yml index 984b70b45d..43acc286a7 100644 --- a/e2e-tests/liveness/compare/statefulset_liveness-rs0-oc.yml +++ b/e2e-tests/liveness/compare/statefulset_liveness-rs0-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: liveness - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: liveness-mongodb-keyfile secret: diff --git a/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml b/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml index 7d88451be4..189de4d86f 100644 --- a/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml +++ b/e2e-tests/liveness/compare/statefulset_liveness-rs0.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: liveness - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: liveness-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg-oc.yml index 6e521a8bb1..4d55bd027d 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg-oc.yml @@ -288,18 +288,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: monitoring - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg.yml index 47e1ca202d..bf1cd8cad6 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-cfg.yml @@ -290,18 +290,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: monitoring - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos-oc.yml index 3fe36be2e8..b07686a3b3 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos-oc.yml @@ -297,17 +297,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongos - app.kubernetes.io/instance: monitoring - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos.yml index 3fe36be2e8..b07686a3b3 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-mongos.yml @@ -297,17 +297,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongos - app.kubernetes.io/instance: monitoring - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm-oc.yml index 805badb1a2..e02a6dbd2a 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm-oc.yml @@ -148,18 +148,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: monitoring - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm.yml index f5b90e2b05..82cd94dffd 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-no-pmm.yml @@ -150,18 +150,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: monitoring - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-oc.yml index efe6970cca..72bbce334c 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0-oc.yml @@ -276,18 +276,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: monitoring - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0.yml index 2cafddd9d5..3905751287 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-rs0.yml @@ -278,18 +278,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: monitoring - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: monitoring-mongodb-keyfile secret: diff --git a/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv-oc.yml b/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv-oc.yml index c55e1abd21..abb3175040 100644 --- a/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv-oc.yml +++ b/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv-oc.yml @@ -169,18 +169,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: nonVoting - app.kubernetes.io/instance: nonvoting - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: nonvoting-mongodb-keyfile secret: diff --git a/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv.yml b/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv.yml index f7bf29b338..f8c7722a16 100644 --- a/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv.yml +++ b/e2e-tests/non-voting/compare/statefulset_nonvoting-rs0-nv.yml @@ -171,18 +171,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: nonVoting - app.kubernetes.io/instance: nonvoting - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: nonvoting-mongodb-keyfile secret: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-oc.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-oc.yml index 3afaf8fe7b..bb34e38592 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-oc.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-oc.yml @@ -216,18 +216,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: one-pod - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: one-pod-mongodb-keyfile secret: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret-oc.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret-oc.yml index 3cf549c7ec..5c41ecd51d 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret-oc.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret-oc.yml @@ -216,18 +216,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: one-pod - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: one-pod-mongodb-keyfile secret: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret.yml index 5f1c56af90..791687b1fc 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0-secret.yml @@ -219,18 +219,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: one-pod - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: one-pod-mongodb-keyfile secret: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0.yml index 0a04231f85..4ae7ea5f89 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-rs0.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-rs0.yml @@ -219,18 +219,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: one-pod - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: one-pod-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-4-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-4-oc.yml index 61b54b0686..706991286f 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-4-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-4-oc.yml @@ -218,18 +218,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-oc.yml index e98f87396a..1b6962195e 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg-oc.yml @@ -217,18 +217,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg.yml index d9a98a7d60..f291188a12 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-cfg.yml @@ -221,18 +221,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: cfg - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: cfg - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-mongos.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-mongos.yml index 927cd0eef0..ac03b3eba2 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-mongos.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-mongos.yml @@ -165,17 +165,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongos - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-4-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-4-oc.yml index 4a7834ed85..ce0671d490 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-4-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-4-oc.yml @@ -212,18 +212,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-oc.yml index 4a6f479248..811070d740 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0-oc.yml @@ -211,18 +211,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0.yml index 302baf1536..690776c354 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs0.yml @@ -215,18 +215,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-4-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-4-oc.yml index f1037ef763..b77e2d6c76 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-4-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-4-oc.yml @@ -211,18 +211,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs1 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-oc.yml index 3623a28859..00b3bc3155 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1-oc.yml @@ -209,18 +209,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs1 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1.yml index 128eb15ebe..0ab1b9dd9f 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs1.yml @@ -214,18 +214,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs1 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-4-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-4-oc.yml index e980ae9718..b8509a51e1 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-4-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-4-oc.yml @@ -221,18 +221,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs2 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-oc.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-oc.yml index c3e2aef4d9..4f3c148d86 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-oc.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2-oc.yml @@ -219,18 +219,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs2 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2.yml b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2.yml index 3206e98539..da7be99979 100644 --- a/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2.yml +++ b/e2e-tests/pitr-sharded/compare/statefulset_some-name-rs2.yml @@ -224,18 +224,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs2 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/pitr/compare/statefulset_some-name-rs0-oc.yml index b0c7164a70..abec220c27 100644 --- a/e2e-tests/pitr/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/pitr/compare/statefulset_some-name-rs0-oc.yml @@ -208,18 +208,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/pitr/compare/statefulset_some-name-rs0.yml b/e2e-tests/pitr/compare/statefulset_some-name-rs0.yml index 552f21b52d..d2a1b79a16 100644 --- a/e2e-tests/pitr/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/pitr/compare/statefulset_some-name-rs0.yml @@ -211,18 +211,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0-oc.yml index bb5776f123..53a9df1a93 100644 --- a/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0.yml b/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0.yml index 064e195281..a60426e3d5 100644 --- a/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/rs-shard-migration/compare/statefulset_some-name-rs0.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0-oc.yml b/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0-oc.yml index 0c66650753..7c2decf5c8 100644 --- a/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0-oc.yml +++ b/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0-oc.yml @@ -211,18 +211,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0.yml b/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0.yml index e5cb82fd41..2ff8f76768 100644 --- a/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0.yml +++ b/e2e-tests/scheduled-backup/compare/statefulset_some-name-rs0.yml @@ -214,18 +214,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-rs0-changed.yml b/e2e-tests/security-context/compare/statefulset_sec-context-rs0-changed.yml index 0ec1768980..623536fb09 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-rs0-changed.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-rs0-changed.yml @@ -218,18 +218,6 @@ spec: serviceAccount: percona-server-mongodb-operator-workload serviceAccountName: percona-server-mongodb-operator-workload terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: sec-context - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: sec-context-mongodb-keyfile secret: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-rs0.yml b/e2e-tests/security-context/compare/statefulset_sec-context-rs0.yml index a32d1803d9..6a216018c8 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-rs0.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-rs0.yml @@ -169,18 +169,6 @@ spec: serviceAccount: percona-server-mongodb-operator-workload serviceAccountName: percona-server-mongodb-operator-workload terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: sec-context - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: sec-context-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0-oc.yml b/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0-oc.yml index 03c74bd69e..a05c3ca493 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0-oc.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0-oc.yml @@ -195,18 +195,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: cluster-ip - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: cluster-ip-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0.yml b/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0.yml index cc31c1fbfb..8381b7f5ce 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_cluster-ip-rs0.yml @@ -198,18 +198,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: cluster-ip - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: cluster-ip-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0-oc.yml b/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0-oc.yml index 97b58a680a..515d7654a6 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0-oc.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0-oc.yml @@ -195,18 +195,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: local-balancer - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: local-balancer-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0.yml b/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0.yml index 2701c4ef11..bc6511c1ad 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_local-balancer-rs0.yml @@ -198,18 +198,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: local-balancer - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: local-balancer-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0-oc.yml b/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0-oc.yml index 4d09e87d20..a743068e7d 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0-oc.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0-oc.yml @@ -195,18 +195,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: node-port - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: node-port-mongodb-keyfile secret: diff --git a/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0.yml b/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0.yml index 0a514eb141..f8d1f7a2c8 100644 --- a/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0.yml +++ b/e2e-tests/service-per-pod/compare/statefulset_node-port-rs0.yml @@ -198,18 +198,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: node-port - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: node-port-mongodb-keyfile secret: diff --git a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter-oc.yml b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter-oc.yml index 621daea995..ef76b0baca 100644 --- a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter-oc.yml +++ b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter-oc.yml @@ -158,18 +158,6 @@ spec: schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: arbiter - app.kubernetes.io/instance: smart-update - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: smart-update-mongodb-keyfile secret: diff --git a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml index 1132a5d8bd..79caa07da0 100644 --- a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml +++ b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-arbiter.yml @@ -160,18 +160,6 @@ spec: securityContext: fsGroup: 1001 terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: arbiter - app.kubernetes.io/instance: smart-update - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: smart-update-mongodb-keyfile secret: diff --git a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-oc.yml b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-oc.yml index 71396da42b..d4f2f70202 100644 --- a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-oc.yml +++ b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: smart-update - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: smart-update-mongodb-keyfile secret: diff --git a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml index 206329485e..a5af0087b2 100644 --- a/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml +++ b/e2e-tests/smart-update/compare/statefulset_smart-update-rs0.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: smart-update - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: smart-update-mongodb-keyfile secret: diff --git a/e2e-tests/storage/compare/statefulset_emptydir-rs0-oc.yml b/e2e-tests/storage/compare/statefulset_emptydir-rs0-oc.yml index c1eca1c311..d2edda1464 100644 --- a/e2e-tests/storage/compare/statefulset_emptydir-rs0-oc.yml +++ b/e2e-tests/storage/compare/statefulset_emptydir-rs0-oc.yml @@ -147,18 +147,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: emptydir - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: emptydir-mongodb-keyfile secret: diff --git a/e2e-tests/storage/compare/statefulset_emptydir-rs0.yml b/e2e-tests/storage/compare/statefulset_emptydir-rs0.yml index 2bfb3be1f9..111bf452a7 100644 --- a/e2e-tests/storage/compare/statefulset_emptydir-rs0.yml +++ b/e2e-tests/storage/compare/statefulset_emptydir-rs0.yml @@ -161,18 +161,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: emptydir - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: emptydir-mongodb-keyfile secret: diff --git a/e2e-tests/storage/compare/statefulset_hostpath-rs0-oc.yml b/e2e-tests/storage/compare/statefulset_hostpath-rs0-oc.yml index baa5a6e35a..82dbd55749 100644 --- a/e2e-tests/storage/compare/statefulset_hostpath-rs0-oc.yml +++ b/e2e-tests/storage/compare/statefulset_hostpath-rs0-oc.yml @@ -147,18 +147,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: hostpath - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: hostpath-mongodb-keyfile secret: diff --git a/e2e-tests/storage/compare/statefulset_hostpath-rs0.yml b/e2e-tests/storage/compare/statefulset_hostpath-rs0.yml index 1e57e24bfc..a013b82dab 100644 --- a/e2e-tests/storage/compare/statefulset_hostpath-rs0.yml +++ b/e2e-tests/storage/compare/statefulset_hostpath-rs0.yml @@ -161,18 +161,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: hostpath - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: hostpath-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110-oc.yml index ed97b0a7ab..6dc6c3ae6a 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1110-oc.yml @@ -168,18 +168,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150-oc.yml index fbbb126037..1bd744c220 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150.yml index 9896529fea..ec6286e35e 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-rs0-1150.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: some-name - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: some-name-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_minimal-cluster-rs0.yml b/e2e-tests/version-service/compare/statefulset_minimal-cluster-rs0.yml index d79777eb00..9ac1a90aed 100644 --- a/e2e-tests/version-service/compare/statefulset_minimal-cluster-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_minimal-cluster-rs0.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: minimal-cluster - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: minimal-cluster-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0-oc.yml b/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0-oc.yml index ceeb9e7d3a..90d77d767f 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0-oc.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: version-service-exact - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-exact-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0.yml b/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0.yml index 04ae13e952..7c74b0b5af 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-exact-rs0.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: version-service-exact - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-exact-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0-oc.yml b/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0-oc.yml index 0d290d65d8..12120a73c1 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0-oc.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: version-service-latest - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-latest-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0.yml b/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0.yml index 58f2ddb8a6..4131c55d36 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-latest-rs0.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: version-service-latest - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-latest-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-major-rs0-oc.yml b/e2e-tests/version-service/compare/statefulset_version-service-major-rs0-oc.yml index acbde63a7e..304ebc9864 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-major-rs0-oc.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-major-rs0-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: version-service-major - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-major-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-major-rs0.yml b/e2e-tests/version-service/compare/statefulset_version-service-major-rs0.yml index 4565a6de6a..dd93ae0e96 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-major-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-major-rs0.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: version-service-major - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-major-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0-oc.yml b/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0-oc.yml index 0c49867173..7c4c5f7abc 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0-oc.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: version-service-recommended - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-recommended-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0.yml b/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0.yml index de030d1000..42ec179fb9 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-recommended-rs0.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: version-service-recommended - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-recommended-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0-oc.yml b/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0-oc.yml index ee425253a0..8cbd2672a0 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0-oc.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0-oc.yml @@ -160,18 +160,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: version-service-unreachable - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-unreachable-mongodb-keyfile secret: diff --git a/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0.yml b/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0.yml index 9e3430ff69..b10e5507dc 100644 --- a/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0.yml +++ b/e2e-tests/version-service/compare/statefulset_version-service-unreachable-rs0.yml @@ -162,18 +162,6 @@ spec: serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 - topologySpreadConstraints: - - labelSelector: - matchLabels: - app.kubernetes.io/component: mongod - app.kubernetes.io/instance: version-service-unreachable - app.kubernetes.io/managed-by: percona-server-mongodb-operator - app.kubernetes.io/name: percona-server-mongodb - app.kubernetes.io/part-of: percona-server-mongodb - app.kubernetes.io/replset: rs0 - maxSkew: 1 - topologyKey: kubernetes.io/hostname - whenUnsatisfiable: DoNotSchedule volumes: - name: version-service-unreachable-mongodb-keyfile secret: From 80072f580321d87c6383fca54fd6b778c2147e0a Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Fri, 18 Aug 2023 17:47:54 +0300 Subject: [PATCH 7/8] don't add topologySpreadConstraints by default --- pkg/apis/psmdb/v1/psmdb_defaults.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/apis/psmdb/v1/psmdb_defaults.go b/pkg/apis/psmdb/v1/psmdb_defaults.go index af35d66096..a05ed2bd4e 100644 --- a/pkg/apis/psmdb/v1/psmdb_defaults.go +++ b/pkg/apis/psmdb/v1/psmdb_defaults.go @@ -808,12 +808,6 @@ func (m *MultiAZ) reconcileTopologySpreadConstraints(cr *PerconaServerMongoDB) { return } - if len(m.TopologySpreadConstraints) == 0 { - m.TopologySpreadConstraints = []corev1.TopologySpreadConstraint{ - {}, // this line ensures that the slice contains at least one element - } - } - for i := range m.TopologySpreadConstraints { if m.TopologySpreadConstraints[i].MaxSkew == 0 { m.TopologySpreadConstraints[i].MaxSkew = 1 From bea658f12d1d1645c684645efeec0545dcba266e Mon Sep 17 00:00:00 2001 From: Andrii Dema Date: Fri, 18 Aug 2023 18:01:48 +0300 Subject: [PATCH 8/8] fix `TestSetSafeDefault` --- pkg/apis/psmdb/v1/psmdb_defaults_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/apis/psmdb/v1/psmdb_defaults_test.go b/pkg/apis/psmdb/v1/psmdb_defaults_test.go index f00524d2fa..2f350a326c 100644 --- a/pkg/apis/psmdb/v1/psmdb_defaults_test.go +++ b/pkg/apis/psmdb/v1/psmdb_defaults_test.go @@ -226,8 +226,9 @@ func TestSetSafeDefault(t *testing.T) { cr := &api.PerconaServerMongoDB{ ObjectMeta: metav1.ObjectMeta{Name: "psmdb-mock", Namespace: "psmdb"}, Spec: api.PerconaServerMongoDBSpec{ - Replsets: []*api.ReplsetSpec{{Name: "rs0", Size: 3}, {Name: "rs1", Size: 3}}, - Sharding: api.Sharding{Enabled: true, Mongos: &api.MongosSpec{Size: 3}}, + CRVersion: version.Version, + Replsets: []*api.ReplsetSpec{{Name: "rs0", Size: 3}, {Name: "rs1", Size: 3}}, + Sharding: api.Sharding{Enabled: true, Mongos: &api.MongosSpec{Size: 3}}, }, }