Skip to content

Commit 6a880c3

Browse files
committed
fix: add addl tags for scale to 0 support for windows nodes
Signed-off-by: Jonah Back <[email protected]>
1 parent ea5c8ae commit 6a880c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controllers/provisioners/eks/helpers.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ func (ctx *EksInstanceGroupContext) GetAddedTags(asgName string) []*autoscaling.
302302
switch strings.ToLower(osFamily) {
303303
case OsFamilyWindows:
304304
tags = append(tags, ctx.AwsWorker.NewTag("k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/os", "windows", asgName))
305+
tags = append(tags, ctx.AwsWorker.NewTag("k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/arch", "amd64", asgName))
306+
instanceTypeNetworkInfo := awsprovider.GetInstanceTypeNetworkInfo(ctx.GetDiscoveredState().GetInstanceTypeInfo(), configuration.InstanceType)
307+
numberOfIps := *instanceTypeNetworkInfo.Ipv4AddressesPerInterface - 1
308+
tags = append(tags, ctx.AwsWorker.NewTag("k8s.io/cluster-autoscaler/node-template/resources/vpc.amazonaws.com/PrivateIPv4Address", strconv.FormatInt(numberOfIps, 10), asgName))
305309
default:
306310
tags = append(tags, ctx.AwsWorker.NewTag("k8s.io/cluster-autoscaler/node-template/label/kubernetes.io/os", "linux", asgName))
307311
}

0 commit comments

Comments
 (0)