diff --git a/integration/tests/crud/creategetdelete_test.go b/integration/tests/crud/creategetdelete_test.go index ca53b19971..22fa5dba79 100644 --- a/integration/tests/crud/creategetdelete_test.go +++ b/integration/tests/crud/creategetdelete_test.go @@ -69,6 +69,8 @@ const ( deleteNg = "ng-delete" taintsNg1 = "ng-taints-1" taintsNg2 = "ng-taints-2" + maxPodsMNG1 = "mng-max-pods-1" + maxPodsMNG2 = "mng-max-pods-2" scaleSingleNg = "ng-scale-single" scaleMultipleNg = "ng-scale-multiple" @@ -872,6 +874,8 @@ var _ = Describe("(Integration) Create, Get, Scale & Delete", func() { clientset := makeClientset() nodeListN1 := tests.ListNodes(clientset, taintsNg1) nodeListN2 := tests.ListNodes(clientset, taintsNg2) + mngNodeListN1 := tests.ListNodes(clientset, maxPodsMNG1) + mngNodeListN2 := tests.ListNodes(clientset, maxPodsMNG2) tests.AssertNodeTaints(nodeListN1, []corev1.Taint{ { @@ -896,12 +900,22 @@ var _ = Describe("(Integration) Create, Get, Scale & Delete", func() { }, }) - By("asserting that maxPods is set correctly") + By("asserting that maxPods is set correctly for AL2 nodegroup") expectedMaxPods := 123 for _, node := range nodeListN1.Items { maxPods, _ := node.Status.Allocatable.Pods().AsInt64() Expect(maxPods).To(Equal(int64(expectedMaxPods))) } + + By("asserting that maxPods is set correctly for AL2023 nodegroups") + for _, node := range mngNodeListN1.Items { + maxPods, _ := node.Status.Allocatable.Pods().AsInt64() + Expect(maxPods).To(Equal(int64(expectedMaxPods))) + } + for _, node := range mngNodeListN2.Items { + maxPods, _ := node.Status.Allocatable.Pods().AsInt64() + Expect(maxPods).To(Equal(int64(expectedMaxPods))) + } }) It("should be able to create a new GPU nodegroup", func() { diff --git a/integration/tests/crud/testdata/taints-max-pods.yaml b/integration/tests/crud/testdata/taints-max-pods.yaml index 7881cd83ac..4fc0efbf66 100644 --- a/integration/tests/crud/testdata/taints-max-pods.yaml +++ b/integration/tests/crud/testdata/taints-max-pods.yaml @@ -6,16 +6,30 @@ metadata: name: nodeGroups: -- name: ng-taints-1 - taints: - key1: val1:NoSchedule - key2: :NoExecute - maxPodsPerNode: 123 -- name: ng-taints-2 - volumeSize: 35 - taints: - - key: key1 - value: value1 - effect: NoSchedule - - key: key2 - effect: NoExecute + - name: ng-taints-1 + taints: + key1: val1:NoSchedule + key2: :NoExecute + maxPodsPerNode: 123 + - name: ng-taints-2 + volumeSize: 35 + taints: + - key: key1 + value: value1 + effect: NoSchedule + - key: key2 + effect: NoExecute + +managedNodeGroups: + - name: mng-max-pods-1 + desiredCapacity: 1 + maxPodsPerNode: 123 + - name: mng-max-pods-2 + desiredCapacity: 1 + overrideBootstrapCommand: | + apiVersion: node.eks.aws/v1alpha1 + kind: NodeConfig + spec: + kubelet: + config: + maxPods: 123