Skip to content

Commit 14652be

Browse files
committed
read min and max values from nodepool tags for oci autodiscovery
1 parent 5095b62 commit 14652be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cluster-autoscaler/cloudprovider/oci/nodepools/oci_manager.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ const (
4040
nodepoolTags = "nodepoolTags"
4141
min = "min"
4242
max = "max"
43+
minSize = "minSize"
44+
maxSize = "maxSize"
4345
)
4446

4547
var (
@@ -218,8 +220,8 @@ func autoDiscoverNodeGroups(m *ociManagerImpl, okeClient okeClient, nodeGroup no
218220
nodepool := &nodePool{}
219221
nodepool.id = *nodePoolSummary.Id
220222
// set minSize-maxSize from nodepool free form tags, or else use nodeGroupAutoDiscovery configuration
221-
nodepool.minSize = getIntFromMap(nodePoolSummary.FreeformTags, "minSize", nodeGroup.minSize)
222-
nodepool.maxSize = getIntFromMap(nodePoolSummary.FreeformTags, "maxSize", nodeGroup.maxSize)
223+
nodepool.minSize = getIntFromMap(nodePoolSummary.FreeformTags, minSize, nodeGroup.minSize)
224+
nodepool.maxSize = getIntFromMap(nodePoolSummary.FreeformTags, maxSize, nodeGroup.maxSize)
223225

224226
nodepool.manager = nodeGroup.manager
225227
nodepool.kubeClient = nodeGroup.kubeClient

0 commit comments

Comments
 (0)