Skip to content

Commit

Permalink
Simplify Resolve()
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Cole committed Jul 21, 2023
1 parent 5d438fa commit dd38aa1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
16 changes: 15 additions & 1 deletion pkg/apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions pkg/providers/amifamily/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ func (r Resolver) Resolve(ctx context.Context, nodeTemplate *v1alpha1.AWSNodeTem
if resolved.MetadataOptions == nil {
resolved.MetadataOptions = amiFamily.DefaultMetadataOptions()
}
if len(nodeTemplate.Spec.LicenseSpecifications) > 0 {
resolved.LicenseSpecifications = nodeTemplate.Spec.LicenseSpecifications
}
resolved.LicenseSpecifications = nodeTemplate.Spec.LicenseSpecifications
resolvedTemplates = append(resolvedTemplates, resolved)
}
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/providers/launchtemplate/launchtemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ func createPlacement(placement *v1alpha1.Placement) *ec2.LaunchTemplatePlacement
return nil
}
return &ec2.LaunchTemplatePlacementRequest{
HostResourceGroupArn: placement.HostResourceGroupARN,
GroupId: placement.GroupID,
}
HostResourceGroupArn: placement.HostResourceGroupARN,
GroupId: placement.GroupID,
}
}

func (p *Provider) blockDeviceMappings(blockDeviceMappings []*v1alpha1.BlockDeviceMapping) []*ec2.LaunchTemplateBlockDeviceMappingRequest {
Expand Down

0 comments on commit dd38aa1

Please sign in to comment.