Skip to content

Commit 7a8848f

Browse files
committed
capacity-resevation requries efa
1 parent 7483b1b commit 7a8848f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kubetest2/internal/deployers/eksapi/deployer.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ type deployerOptions struct {
5454
Addons []string `flag:"addons" desc:"Managed addons (name:version pairs) to create in the cluster. Use 'latest' for the most recent version, or 'default' for the default version."`
5555
AMI string `flag:"ami" desc:"AMI for unmanaged nodes"`
5656
AMIType string `flag:"ami-type" desc:"AMI type for managed nodes"`
57-
CapacityReservation bool `flag:"capacity-reservation" desc:"Use capacity reservation for the unmanaged nodegroup"`
57+
CapacityReservation bool `flag:"capacity-reservation" desc:"Use capacity reservation for the unmanaged nodegroup."`
5858
ClusterRoleServicePrincipal string `flag:"cluster-role-service-principal" desc:"Additional service principal that can assume the cluster role"`
5959
EFA bool `flag:"efa" desc:"Create EFA interfaces on the node of an unmanaged nodegroup. Requires --unmanaged-nodes."`
6060
EKSEndpointURL string `flag:"endpoint-url" desc:"Endpoint URL for the EKS API"`
@@ -245,6 +245,9 @@ func (d *deployer) verifyUpFlags() error {
245245
d.UserDataFormat = "bootstrap.sh"
246246
klog.V(2).Infof("Using default user data format: %s", d.UserDataFormat)
247247
}
248+
if d.CapacityReservation && !d.EFA{
249+
klog.V(2).Infof("using --capacity-reservation when --efa set to false, test may failed if")
250+
}
248251
if d.EFA && len(d.InstanceTypes) != 1 {
249252
return fmt.Errorf("--efa requires a single instance type")
250253
}

0 commit comments

Comments
 (0)