From 7a8848f7c0d48ee05cbdbdd701df7ab0ac04af4a Mon Sep 17 00:00:00 2001 From: Sichaow Date: Mon, 16 Sep 2024 12:19:49 -0700 Subject: [PATCH] capacity-resevation requries efa --- kubetest2/internal/deployers/eksapi/deployer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kubetest2/internal/deployers/eksapi/deployer.go b/kubetest2/internal/deployers/eksapi/deployer.go index e813d5c30..5b03e3ffd 100644 --- a/kubetest2/internal/deployers/eksapi/deployer.go +++ b/kubetest2/internal/deployers/eksapi/deployer.go @@ -54,7 +54,7 @@ type deployerOptions struct { 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."` AMI string `flag:"ami" desc:"AMI for unmanaged nodes"` AMIType string `flag:"ami-type" desc:"AMI type for managed nodes"` - CapacityReservation bool `flag:"capacity-reservation" desc:"Use capacity reservation for the unmanaged nodegroup"` + CapacityReservation bool `flag:"capacity-reservation" desc:"Use capacity reservation for the unmanaged nodegroup."` ClusterRoleServicePrincipal string `flag:"cluster-role-service-principal" desc:"Additional service principal that can assume the cluster role"` EFA bool `flag:"efa" desc:"Create EFA interfaces on the node of an unmanaged nodegroup. Requires --unmanaged-nodes."` EKSEndpointURL string `flag:"endpoint-url" desc:"Endpoint URL for the EKS API"` @@ -245,6 +245,9 @@ func (d *deployer) verifyUpFlags() error { d.UserDataFormat = "bootstrap.sh" klog.V(2).Infof("Using default user data format: %s", d.UserDataFormat) } + if d.CapacityReservation && !d.EFA{ + klog.V(2).Infof("using --capacity-reservation when --efa set to false, test may failed if") + } if d.EFA && len(d.InstanceTypes) != 1 { return fmt.Errorf("--efa requires a single instance type") }