@@ -333,27 +333,6 @@ func (p *DefaultProvider) launchInstance(
333
333
return createFleetOutput .Instances [0 ], nil
334
334
}
335
335
336
- func GetCreateFleetInput (nodeClass * v1.EC2NodeClass , capacityType string , tags map [string ]string , launchTemplateConfigs []ec2types.FleetLaunchTemplateConfigRequest ) * ec2.CreateFleetInput {
337
- return & ec2.CreateFleetInput {
338
- Type : ec2types .FleetTypeInstant ,
339
- Context : nodeClass .Spec .Context ,
340
- LaunchTemplateConfigs : launchTemplateConfigs ,
341
- TargetCapacitySpecification : & ec2types.TargetCapacitySpecificationRequest {
342
- DefaultTargetCapacityType : lo .Ternary (
343
- capacityType == karpv1 .CapacityTypeReserved ,
344
- ec2types .DefaultTargetCapacityType (karpv1 .CapacityTypeOnDemand ),
345
- ec2types .DefaultTargetCapacityType (capacityType ),
346
- ),
347
- TotalTargetCapacity : aws .Int32 (1 ),
348
- },
349
- TagSpecifications : []ec2types.TagSpecification {
350
- {ResourceType : ec2types .ResourceTypeInstance , Tags : utils .EC2MergeTags (tags )},
351
- {ResourceType : ec2types .ResourceTypeVolume , Tags : utils .EC2MergeTags (tags )},
352
- {ResourceType : ec2types .ResourceTypeFleet , Tags : utils .EC2MergeTags (tags )},
353
- },
354
- }
355
- }
356
-
357
336
func (p * DefaultProvider ) checkODFallback (nodeClaim * karpv1.NodeClaim , instanceTypes []* cloudprovider.InstanceType , launchTemplateConfigs []ec2types.FleetLaunchTemplateConfigRequest ) error {
358
337
// only evaluate for on-demand fallback if the capacity type for the request is OD and both OD and spot are allowed in requirements
359
338
if getCapacityType (nodeClaim , instanceTypes ) != karpv1 .CapacityTypeOnDemand || ! scheduling .NewNodeSelectorRequirementsWithMinValues (nodeClaim .Spec .Requirements ... ).Get (karpv1 .CapacityTypeLabelKey ).Has (karpv1 .CapacityTypeSpot ) {
0 commit comments