Skip to content

Commit 788269b

Browse files
authored
[Bugfix] [Platform] Fix topology for Gateways (#1997)
1 parent 9bb638d commit 788269b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
44
- (Bugfix) (Platform) Fix Container Resource Adjustments
55
- (Bugfix) (Platform) Fix LM CLI Option
6+
- (Bugfix) (Platform) Fix topology for Gateways
67

78
## [1.3.2](https://github.com/arangodb/kube-arangodb/tree/1.3.2) (2025-11-20)
89
- (Bugfix) (Platform) Increase memory limit for Inventory

pkg/deployment/resources/pod_creator_gateway_pod.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import (
3232
schedulerApi "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
3333
shared "github.com/arangodb/kube-arangodb/pkg/apis/shared"
3434
"github.com/arangodb/kube-arangodb/pkg/deployment/pod"
35+
"github.com/arangodb/kube-arangodb/pkg/deployment/topology"
3536
integrationsSidecar "github.com/arangodb/kube-arangodb/pkg/integrations/sidecar"
3637
"github.com/arangodb/kube-arangodb/pkg/util/collection"
3738
"github.com/arangodb/kube-arangodb/pkg/util/errors"
@@ -68,6 +69,8 @@ func (m *MemberGatewayPod) GetPodAntiAffinity() *core.PodAntiAffinity {
6869

6970
pod.AppendPodAntiAffinityDefault(m, a)
7071

72+
a = kresources.MergePodAntiAffinity(a, topology.GetTopologyAffinityRules(m.context.GetName(), m.Status, m.Group, m.Member).PodAntiAffinity)
73+
7174
a = kresources.MergePodAntiAffinity(a, m.GroupSpec.AntiAffinity)
7275

7376
return kresources.OptionalPodAntiAffinity(a)
@@ -76,10 +79,12 @@ func (m *MemberGatewayPod) GetPodAntiAffinity() *core.PodAntiAffinity {
7679
func (m *MemberGatewayPod) GetPodAffinity() *core.PodAffinity {
7780
a := &core.PodAffinity{}
7881

79-
pod.AppendAffinityWithRole(m, a, api.ServerGroupDBServers.AsRole())
82+
pod.AppendAffinityWithRole(m, a, api.ServerGroupCoordinators.AsRole())
8083

8184
a = kresources.MergePodAffinity(a, m.GroupSpec.Affinity)
8285

86+
a = kresources.MergePodAffinity(a, topology.GetTopologyAffinityRules(m.context.GetName(), m.Status, m.Group, m.Member).PodAffinity)
87+
8388
return kresources.OptionalPodAffinity(a)
8489
}
8590

@@ -90,6 +95,8 @@ func (m *MemberGatewayPod) GetNodeAffinity() *core.NodeAffinity {
9095

9196
a = kresources.MergeNodeAffinity(a, m.GroupSpec.NodeAffinity)
9297

98+
a = kresources.MergeNodeAffinity(a, topology.GetTopologyAffinityRules(m.context.GetName(), m.Status, m.Group, m.Member).NodeAffinity)
99+
93100
return kresources.OptionalNodeAffinity(a)
94101
}
95102

0 commit comments

Comments
 (0)