Skip to content

Commit

Permalink
Adding logs to instance provider create
Browse files Browse the repository at this point in the history
  • Loading branch information
jigisha620 committed Oct 24, 2024
1 parent 8e7eff5 commit 89f9aeb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/providers/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1.EC2NodeClass
}
instanceTypes, err := cloudprovider.InstanceTypes(instanceTypes).Truncate(schedulingRequirements, maxInstanceTypes)
if err != nil {
log.FromContext(ctx).Error(err, "truncating instance types")
return nil, fmt.Errorf("truncating instance types, %w", err)
}
tags := getTags(ctx, nodeClass, nodeClaim)
Expand All @@ -107,6 +108,7 @@ func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1.EC2NodeClass
fleetInstance, err = p.launchInstance(ctx, nodeClass, nodeClaim, instanceTypes, tags)
}
if err != nil {
log.FromContext(ctx).Error(err, "launching instance")
return nil, err
}
efaEnabled := lo.Contains(lo.Keys(nodeClaim.Spec.Resources.Requests), v1.ResourceEFA)
Expand Down

0 comments on commit 89f9aeb

Please sign in to comment.