Skip to content

Commit a63890e

Browse files
authored
Fix horizontal scaling for ReplicationGroups (#136)
This will set the value for the number of node groups of a ReplicationGroup to the value given in the Spec, thereby enabling horizontal scaling. Fixes aws-controllers-k8s/community#2080. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 63b9491 commit a63890e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/resource/replication_group/post_set_output.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ func setNodeGroupConfiguration(
8989

9090
ko.Spec.NodeGroupConfiguration = nodeGroupConfigurations
9191
}
92+
93+
if respRG.NodeGroups != nil && ko.Spec.NumNodeGroups != nil {
94+
*ko.Spec.NumNodeGroups = int64(len(respRG.NodeGroups))
95+
}
9296
}
9397

9498
//TODO: for all the fields here, reevaluate if the latest observed state should always be populated,

0 commit comments

Comments
 (0)