dongjoon-hyun opened a new pull request, #843:
URL: https://github.com/apache/spark-kubernetes-operator/pull/843
### What changes were proposed in this pull request?
This PR aims to make `AppInitStep` and `ClusterInitStep` wait for the Kueue
`Workload` admission of a `SparkApplication` or `SparkCluster` labeled with
`kueue.x-k8s.io/queue-name`.
| Resource | State | With `kueue.x-k8s.io/queue-name` |
|---|---|---|
| `SparkApplication` | `Submitted`, `ScheduledToRestart` | Hold driver
creation until the `Workload` is admitted |
| `SparkCluster` | `Submitted` | Hold master / worker creation until the
`Workload` is admitted |
- The check runs right after the `spec.suspend` hold and the restart
backoff, and uses `KueueWorkloadUtils.requestAdmission` (SPARK-59588).
- `ADMITTED`: create the resources as before.
- `PENDING`: requeue with the default interval. The `Workload` informer
(SPARK-59593) triggers a reconciliation on admission.
- `STALE`: requeue after 5 seconds.
- `spec.suspend` takes precedence, so a suspended resource does not get a
`Workload`.
- Like the `spec.suspend` hold, the check is skipped once the driver pod (or
the master `StatefulSet`) already exists.
- No state is written while waiting, so the resource stays in `Submitted` /
`ScheduledToRestart`.
- Unsupported specs, such as dynamic allocation, end up in
`SchedulingFailure`.
- Add a `Kueue` section to `docs/spark_custom_resources.md`.
- Extend `tests/e2e/kueue` with labeled `SparkApplication` and
`SparkCluster`. Each waits on a zero-quota `ClusterQueue` and completes after
the quota is raised.
### Why are the changes needed?
To wire the existing Kueue building blocks (SPARK-59588, SPARK-59593,
SPARK-59594, SPARK-59610) into reconciliation, so that the operator actually
participates in Kueue job queueing.
### Does this PR introduce _any_ user-facing change?
No. The Kueue integration is not released yet.
### How was this patch tested?
Pass the CIs with the newly added test cases in `AppInitStepTest` and
`ClusterInitStepTest`, and the extended `tests/e2e/kueue` suite.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5
--
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]