1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Bugfix] Change SyncWorker Affinity to Soft (#1128)

This commit is contained in:
Adam Janikowski 2022-09-27 16:21:25 +02:00 committed by GitHub
parent 198cac593f
commit 84643e6bc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 12 deletions

View file

@ -6,6 +6,7 @@
- (Feature) Active Member condition
- (Bugfix) Accept Initial Spec
- (Bugfix) Prevent LifeCycle restarts
- (Bugfix) Change SyncWorker Affinity to Soft
## [1.2.17](https://github.com/arangodb/kube-arangodb/tree/1.2.17) (2022-09-22)
- (Feature) Add new field to DeploymentReplicationStatus with details on DC2DC sync status=

View file

@ -64,20 +64,13 @@ func AppendAffinityWithRole(p interfaces.PodCreator, a *core.PodAffinity, role s
labelSelector := &meta.LabelSelector{
MatchLabels: k8sutil.LabelsForDeployment(p.GetName(), role),
}
if !p.IsDeploymentMode() {
a.RequiredDuringSchedulingIgnoredDuringExecution = append(a.RequiredDuringSchedulingIgnoredDuringExecution, core.PodAffinityTerm{
a.PreferredDuringSchedulingIgnoredDuringExecution = append(a.PreferredDuringSchedulingIgnoredDuringExecution, core.WeightedPodAffinityTerm{
Weight: 1,
PodAffinityTerm: core.PodAffinityTerm{
LabelSelector: labelSelector,
TopologyKey: shared.TopologyKeyHostname,
})
} else {
a.PreferredDuringSchedulingIgnoredDuringExecution = append(a.PreferredDuringSchedulingIgnoredDuringExecution, core.WeightedPodAffinityTerm{
Weight: 1,
PodAffinityTerm: core.PodAffinityTerm{
LabelSelector: labelSelector,
TopologyKey: shared.TopologyKeyHostname,
},
})
}
},
})
}
func MergePodAntiAffinity(a, b *core.PodAntiAffinity) {