dongjoon-hyun commented on code in PR #829:
URL: 
https://github.com/apache/spark-kubernetes-operator/pull/829#discussion_r4026915106


##########
.github/workflows/build_and_test.yml:
##########
@@ -231,6 +241,20 @@ jobs:
         if: matrix.mode == 'selector'
         run: |
           chainsaw test --test-dir ./tests/e2e/${{ matrix.test-group }} 
--parallel 1
+      - name: Run Spark K8s Operator on K8S with Kueue Enabled
+        if: matrix.mode == 'kueue'
+        run: |
+          eval $(minikube docker-env)
+          ./gradlew buildDockerImage
+          helm install spark --create-namespace -f \
+          build-tools/helm/spark-kubernetes-operator/values.yaml -f \
+          tests/e2e/helm/kueue-config-values.yaml \

Review Comment:
   Fixed. The description now points to 
`tests/e2e/helm/kueue-config-values.yaml` and explains why it lowers the 
operator CPU request.



##########
tests/e2e/kueue/chainsaw-test.yaml:
##########
@@ -0,0 +1,98 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: chainsaw.kyverno.io/v1alpha1
+kind: Test
+metadata:
+  name: spark-operator-kueue
+spec:
+  namespace: default
+  steps:
+  - name: spark-application-without-queue-name-is-not-queued
+    try:
+    - apply:
+        file: ../../../examples/pi.yaml
+    - assert:
+        bindings:
+          - name: SPARK_APP_NAMESPACE
+            value: default
+          - name: SPARK_APPLICATION_NAME
+            value: pi
+        timeout: 10m
+        file: "../assertions/spark-application/spark-state-transition.yaml"
+    - error:

Review Comment:
   Agreed, thanks. I kept the group and said so: 2955b4d adds a comment above 
both `error:` steps, and the "Why" section now states that no operator code 
path creates a `Workload` yet, so today the value is running operator-created 
pods and StatefulSets under Kueue's `failurePolicy: Fail` webhooks.



##########
tests/e2e/kueue/chainsaw-test.yaml:
##########
@@ -0,0 +1,98 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: chainsaw.kyverno.io/v1alpha1
+kind: Test
+metadata:
+  name: spark-operator-kueue
+spec:
+  namespace: default
+  steps:
+  - name: spark-application-without-queue-name-is-not-queued
+    try:
+    - apply:
+        file: ../../../examples/pi.yaml

Review Comment:
   Good catch. 2955b4d switches the application step to a local 
`tests/e2e/kueue/spark-example.yaml` with no dynamic allocation and 
`spark.executor.instances: "1"`, so it passes the factory guard. The CI node 
reports 4 allocatable cores, so the budget is 750m (system) + 500m (Kueue) + 
100m (operator) + 1000m (driver) + 1000m (executor) = 3350m. The cluster step 
keeps `examples/qa-cluster-with-one-worker.yaml` since it passes the HPA guard, 
as you noted.



##########
.github/workflows/build_and_test.yml:
##########
@@ -176,6 +179,13 @@ jobs:
         run: |
           kubectl get pods -A
           kubectl describe node
+      - name: Install Kueue
+        if: matrix.mode == 'kueue'
+        run: |
+          kubectl apply --server-side -f 
https://github.com/kubernetes-sigs/kueue/releases/download/v0.19.4/manifests.yaml

Review Comment:
   Done in 2955b4d: `KUEUE_VERSION: v0.19.4` is now a workflow-level `env`, and 
both installs use `${{ env.KUEUE_VERSION }}`.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to