Skip to content

Commit 7949a7c

Browse files
authored
[Bugfix] Always stop Sync if disabled (#1130)
1 parent d7e7ad7 commit 7949a7c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- (Bugfix) Prevent LifeCycle restarts
99
- (Bugfix) Change SyncWorker Affinity to Soft
1010
- (Feature) Add HostAliases for Sync
11+
- (Bugfix) Always stop Sync if disabled
1112

1213
## [1.2.17](https://github.com/arangodb/kube-arangodb/tree/1.2.17) (2022-09-22)
1314
- (Feature) Add new field to DeploymentReplicationStatus with details on DC2DC sync status=

pkg/deployment/reconcile/plan_builder_scale.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,13 @@ func (r *Reconciler) createScaleMemberPlan(ctx context.Context, apiObject k8suti
6363
}
6464
if spec.GetMode().SupportsSync() {
6565
// Scale syncmasters & syncworkers
66-
plan = append(plan, r.createScalePlan(status, status.Members.SyncMasters, api.ServerGroupSyncMasters, spec.SyncMasters.GetCount(), context)...)
67-
plan = append(plan, r.createScalePlan(status, status.Members.SyncWorkers, api.ServerGroupSyncWorkers, spec.SyncWorkers.GetCount(), context)...)
66+
if spec.Sync.IsEnabled() {
67+
plan = append(plan, r.createScalePlan(status, status.Members.SyncMasters, api.ServerGroupSyncMasters, spec.SyncMasters.GetCount(), context)...)
68+
plan = append(plan, r.createScalePlan(status, status.Members.SyncWorkers, api.ServerGroupSyncWorkers, spec.SyncWorkers.GetCount(), context)...)
69+
} else {
70+
plan = append(plan, r.createScalePlan(status, status.Members.SyncMasters, api.ServerGroupSyncMasters, 0, context)...)
71+
plan = append(plan, r.createScalePlan(status, status.Members.SyncWorkers, api.ServerGroupSyncWorkers, 0, context)...)
72+
}
6873
}
6974

7075
return plan

0 commit comments

Comments
 (0)