diff --git a/test/pkg/environment/aws/environment.go b/test/pkg/environment/aws/environment.go index 9fc111b9759c..e5e95c962f87 100644 --- a/test/pkg/environment/aws/environment.go +++ b/test/pkg/environment/aws/environment.go @@ -42,6 +42,10 @@ import ( const WindowsDefaultImage = "mcr.microsoft.com/oss/kubernetes/pause:3.9" +// ExcludedInstanceFamilies denotes instance families that have issues during resource registration due to compatability +// issues with versions of the VPR Resource Controller +var ExcludedInstanceFamilies = []string{"m7a", "r7a", "c7a", "r7i"} + type Environment struct { *common.Environment Region string diff --git a/test/suites/alpha/drift/suite_test.go b/test/suites/alpha/drift/suite_test.go index d27a7fcc5a07..3fce8ca0e58a 100644 --- a/test/suites/alpha/drift/suite_test.go +++ b/test/suites/alpha/drift/suite_test.go @@ -379,7 +379,7 @@ var _ = Describe("Drift", Label("AWS"), func() { // Drift should fail and the original node should be uncordoned // TODO: reduce timeouts when deprovisioning waits are factored out - env.EventuallyExpectNodesUncordonedLegacyWithTimeout(12*time.Minute, cordonedNodes...) + env.EventuallyExpectNodesUncordonedLegacyWithTimeout(11*time.Minute, cordonedNodes...) Eventually(func(g Gomega) { machines := &v1alpha5.MachineList{} @@ -433,8 +433,8 @@ var _ = Describe("Drift", Label("AWS"), func() { cordonedNodes := env.EventuallyExpectCordonedNodeCountLegacy("==", 1) // Drift should fail and original node should be uncordoned - // TODO: reduce timeouts when deprovisioning waits are factored outr - env.EventuallyExpectNodesUncordonedLegacyWithTimeout(12*time.Minute, cordonedNodes...) + // TODO: reduce timeouts when deprovisioning waits are factored out + env.EventuallyExpectNodesUncordonedLegacyWithTimeout(11*time.Minute, cordonedNodes...) // Expect that the new machine/node is kept around after the un-cordon nodeList := &v1.NodeList{} diff --git a/test/suites/beta/drift/suite_test.go b/test/suites/beta/drift/suite_test.go index a3a0530a53c3..b1872f270dec 100644 --- a/test/suites/beta/drift/suite_test.go +++ b/test/suites/beta/drift/suite_test.go @@ -433,6 +433,7 @@ var _ = Describe("Beta/Drift", Label("AWS"), func() { // TODO: reduce timeouts when disruption waits are factored out env.EventuallyExpectNodesUncordonedWithTimeout(11*time.Minute, cordonedNodes...) + // We give another 6 minutes here to handle the deletion at the 15m registration timeout Eventually(func(g Gomega) { nodeClaims := &corev1beta1.NodeClaimList{} g.Expect(env.Client.List(env, nodeClaims, client.HasLabels{test.DiscoveryLabel})).To(Succeed()) @@ -485,8 +486,8 @@ var _ = Describe("Beta/Drift", Label("AWS"), func() { cordonedNodes := env.EventuallyExpectCordonedNodeCount("==", 1) // Drift should fail and original node should be uncordoned - // TODO: reduce timeouts when disruption waits are factored outr - env.EventuallyExpectNodesUncordonedWithTimeout(12*time.Minute, cordonedNodes...) + // TODO: reduce timeouts when disruption waits are factored out + env.EventuallyExpectNodesUncordonedWithTimeout(11*time.Minute, cordonedNodes...) // Expect that the new nodeClaim/node is kept around after the un-cordon nodeList := &v1.NodeList{} diff --git a/test/suites/beta/integration/ami_test.go b/test/suites/beta/integration/ami_test.go index bc2ddc96fab3..070be1f4ff3c 100644 --- a/test/suites/beta/integration/ami_test.go +++ b/test/suites/beta/integration/ami_test.go @@ -41,8 +41,13 @@ var _ = Describe("AMI", func() { customAMI = env.GetCustomAMI("/aws/service/eks/optimized-ami/%s/amazon-linux-2/recommended/image_id", 1) }) - It("should use the AMI defined by the AMI Selector", func() { + It("should use the AMI defined by the AMI Selector Terms", func() { pod := coretest.Pod() + nodeClass.Spec.AMISelectorTerms = []v1beta1.AMISelectorTerm{ + { + ID: customAMI, + }, + } env.ExpectCreated(pod, nodeClass, nodePool) env.EventuallyExpectHealthy(pod) env.ExpectCreatedNodeCount("==", 1) @@ -74,7 +79,7 @@ var _ = Describe("AMI", func() { env.ExpectInstance(pod.Spec.NodeName).To(HaveField("ImageId", HaveValue(Equal(customAMI)))) }) - It("should support ami selector Name but fail with incorrect owners", func() { + It("should support AMI Selector Terms for Name but fail with incorrect owners", func() { output, err := env.EC2API.DescribeImages(&ec2.DescribeImagesInput{ ImageIds: []*string{aws.String(customAMI)}, }) @@ -155,7 +160,7 @@ var _ = Describe("AMI", func() { { Key: v1beta1.LabelInstanceFamily, Operator: v1.NodeSelectorOpNotIn, - Values: []string{"m7a", "r7a", "c7a"}, + Values: awsenv.ExcludedInstanceFamilies, }, { Key: v1beta1.LabelInstanceCategory, @@ -290,7 +295,7 @@ var _ = Describe("AMI", func() { { Key: v1beta1.LabelInstanceFamily, Operator: v1.NodeSelectorOpNotIn, - Values: []string{"m7a", "r7a", "c7a"}, + Values: awsenv.ExcludedInstanceFamilies, }, { Key: v1beta1.LabelInstanceCategory, diff --git a/test/suites/beta/integration/extended_resources_test.go b/test/suites/beta/integration/extended_resources_test.go index d2ab03eae3e2..f8dc328b6fe4 100644 --- a/test/suites/beta/integration/extended_resources_test.go +++ b/test/suites/beta/integration/extended_resources_test.go @@ -30,6 +30,7 @@ import ( "github.com/aws/karpenter-core/pkg/test" "github.com/aws/karpenter/pkg/apis/v1beta1" + awsenv "github.com/aws/karpenter/test/pkg/environment/aws" ) var _ = Describe("Extended Resources", func() { @@ -95,7 +96,7 @@ var _ = Describe("Extended Resources", func() { { Key: v1beta1.LabelInstanceFamily, Operator: v1.NodeSelectorOpNotIn, - Values: []string{"m7a", "r7a", "c7a"}, + Values: awsenv.ExcludedInstanceFamilies, }, { Key: v1beta1.LabelInstanceCategory, diff --git a/test/suites/beta/integration/kubelet_config_test.go b/test/suites/beta/integration/kubelet_config_test.go index 729c2b1c4576..3ec78ccd6fb6 100644 --- a/test/suites/beta/integration/kubelet_config_test.go +++ b/test/suites/beta/integration/kubelet_config_test.go @@ -90,7 +90,7 @@ var _ = Describe("KubeletConfiguration Overrides", func() { { Key: v1beta1.LabelInstanceFamily, Operator: v1.NodeSelectorOpNotIn, - Values: []string{"m7a", "r7a", "c7a"}, + Values: aws.ExcludedInstanceFamilies, }, { Key: v1beta1.LabelInstanceCategory, @@ -133,7 +133,7 @@ var _ = Describe("KubeletConfiguration Overrides", func() { { Key: v1beta1.LabelInstanceFamily, Operator: v1.NodeSelectorOpNotIn, - Values: []string{"m7a", "r7a", "c7a"}, + Values: aws.ExcludedInstanceFamilies, }, { Key: v1beta1.LabelInstanceCategory, diff --git a/test/suites/beta/integration/scheduling_test.go b/test/suites/beta/integration/scheduling_test.go index 985cc06484b5..8c3511988762 100644 --- a/test/suites/beta/integration/scheduling_test.go +++ b/test/suites/beta/integration/scheduling_test.go @@ -239,7 +239,7 @@ var _ = Describe("Scheduling", Ordered, ContinueOnFailure, func() { { Key: v1beta1.LabelInstanceFamily, Operator: v1.NodeSelectorOpNotIn, - Values: []string{"m7a", "r7a", "c7a"}, + Values: aws.ExcludedInstanceFamilies, }, { Key: v1beta1.LabelInstanceCategory,