CA: Iterate through existed node groups in AnnotationNodeInfoProvider
This commit is contained in:
parent
0caa3251c7
commit
887e16c3fc
|
|
@ -45,12 +45,11 @@ func (p *AnnotationNodeInfoProvider) Process(ctx *context.AutoscalingContext, no
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, nodeInfo := range nodeInfos {
|
||||
nodeGroup, err := ctx.CloudProvider.NodeGroupForNode(nodeInfo.Node())
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
template, err := nodeGroup.TemplateNodeInfo()
|
||||
// Add annotatios to the NodeInfo to use later in expander.
|
||||
nodeGroups := ctx.CloudProvider.NodeGroups()
|
||||
for _, ng := range nodeGroups {
|
||||
if nodeInfo, ok := nodeInfos[ng.Id()]; ok {
|
||||
template, err := ng.TemplateNodeInfo()
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
|
@ -60,6 +59,7 @@ func (p *AnnotationNodeInfoProvider) Process(ctx *context.AutoscalingContext, no
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nodeInfos, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue