Skip to content

Commit

Permalink
Use primary ENI SGs if SG is null for Custom networking
Browse files Browse the repository at this point in the history
  • Loading branch information
jayanthvn committed Nov 3, 2020
1 parent ccd6887 commit 4424dbf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/awsutils/awsutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,11 @@ func (cache *EC2InstanceMetadataCache) createENI(useCustomCfg bool, sg []*string

if useCustomCfg {
log.Info("Using a custom network config for the new ENI")
input.Groups = sg
if len(sg) != 0 {
input.Groups = sg
} else {
log.Warnf("No custom networking security group found, will use the node's primary ENI's SG: %s", input.Groups)
}
input.SubnetId = aws.String(subnet)
} else {
log.Info("Using same config as the primary interface for the new ENI")
Expand Down

0 comments on commit 4424dbf

Please sign in to comment.