rrajesh-cloudera commented on code in PR #904:
URL: https://github.com/apache/yunikorn-k8shim/pull/904#discussion_r1745200312
##########
test/e2e/basic_scheduling/basic_scheduling_test.go:
##########
@@ -119,6 +119,56 @@ var _ = ginkgo.Describe("", func() {
Ω(resMap["vcore"]).To(gomega.Equal(core))
})
+ ginkgo.It("Verify_BestEffort_QOS_Pod_Scheduling", func() {
+ ginkgo.By("Create a pod with QOS class set to BestEffort")
+ bestEffortPodConfig := k8s.SleepPodConfig{Name:
"besteffortpod", NS: dev, QOSClass: v1.PodQOSBestEffort}
+ initPod, podErr := k8s.InitSleepPod(bestEffortPodConfig)
+ gomega.Ω(podErr).NotTo(gomega.HaveOccurred())
+ bestEffortPod, err := kClient.CreatePod(initPod, dev)
+ gomega.Ω(err).NotTo(gomega.HaveOccurred())
+
+ ginkgo.By("Wait for the pod to move to running state")
+ err = kClient.WaitForPodRunning(dev, bestEffortPodConfig.Name,
30*time.Second)
+ gomega.Ω(err).NotTo(gomega.HaveOccurred())
+
+ ginkgo.By("Verify that the pod is scheduled and running")
+ appsInfo, err = restClient.GetAppInfo("default", "root."+dev,
bestEffortPod.ObjectMeta.Labels["applicationId"])
+ gomega.Ω(err).NotTo(gomega.HaveOccurred())
+ gomega.Ω(appsInfo).NotTo(gomega.BeNil())
+ gomega.Ω(appsInfo.State).To(gomega.Equal("Running"))
+
+ ginkgo.By("Verify that the pod's QOS class is BestEffort")
+
gomega.Ω(bestEffortPod.Status.QOSClass).To(gomega.Equal(v1.PodQOSBestEffort))
+
Review Comment:
For BestEffortPod we are not setting any resources.
- Guaranteed: A pod where each container has the same requests and limits
for CPU and memory.
- Burstable: A pod where one or more containers have resource requests set,
but no corresponding limits or they differ.
- BestEffort: A pod where neither resource requests nor limits are set.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]