Skip to content

Commit 419b93b

Browse files
authored
Merge pull request #16051 from hakman/karpenter_delete_ig
aws: Skip ASG cleanup on Karpenter managed IG deletion
2 parents 1f6d492 + 2c8a90c commit 419b93b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

upup/pkg/fi/cloudup/awsup/aws_cloud.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,10 @@ func NewEC2Filter(name string, values ...string) *ec2.Filter {
501501

502502
// DeleteGroup deletes an aws autoscaling group
503503
func (c *awsCloudImplementation) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error {
504+
if g.InstanceGroup != nil && g.InstanceGroup.Spec.Manager == kops.InstanceManagerKarpenter {
505+
return nil
506+
}
507+
504508
if c.spotinst != nil {
505509
if featureflag.SpotinstHybrid.Enabled() {
506510
if _, ok := g.Raw.(*autoscaling.Group); ok {

0 commit comments

Comments
 (0)