Skip to content

Commit

Permalink
added warning if delete on termination is set to false for the primar…
Browse files Browse the repository at this point in the history
…y eni
  • Loading branch information
jayanthvn committed Jun 12, 2020
1 parent bc04604 commit 8ae5cd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/awsutils/awsutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,9 @@ func (cache *EC2InstanceMetadataCache) DescribeAllENIs() ([]ENIMetadata, map[str
if len(tags) > 0 {
tagMap[eniMetadata.ENIID] = tags
}
if aws.Int64Value(ec2res.Attachment.DeviceIndex) == 0 && !aws.BoolValue(ec2res.Attachment.DeleteOnTermination) {
log.Warn("Primary ENI will not get deleted when node terminates because 'delete_on_termination' is set to false")
}
}
return verifiedENIs, tagMap, nil
}
Expand Down

0 comments on commit 8ae5cd1

Please sign in to comment.