dongjoon-hyun opened a new pull request, #828:
URL: https://github.com/apache/spark-kubernetes-operator/pull/828

   ### What changes were proposed in this pull request?
   
   This PR aims to honor `spec.suspend` in `AppInitStep` and `ClusterInitStep`.
   
   | Resource           | State                           | `spec.suspend: 
true`                              |
   
|--------------------|---------------------------------|---------------------------------------------------|
   | `SparkApplication` | `Submitted`, `ScheduledToRestart` | Skip driver 
creation, `completeAndDefaultRequeue()` |
   | `SparkCluster`     | `Submitted`                     | Skip master / 
worker creation, `completeAndDefaultRequeue()` |
   
   - The status is not touched while suspended.
   - Setting `spec.suspend` back to `false` triggers a reconcile and enters the 
existing init path.
   - Validation, cleanup and deletion run before the init steps and are 
unaffected by `spec.suspend`.
   - Add `tests/e2e/suspend` and a `Suspend` section to 
`docs/spark_custom_resources.md`.
   
   Suspending an already running application or cluster is out of scope and 
will be handled in a follow-up.
   
   ### Why are the changes needed?
   
   `spec.suspend` was added in SPARK-59475 but the operator does not read it 
yet. Job queueing systems such as Kueue create a workload with `suspend: true` 
and flip it to `false` once quota is available.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. `spec.suspend` is not released yet.
   
   | `spec.suspend` | Before                                  | After           
                             |
   
|----------------|-----------------------------------------|----------------------------------------------|
   | `true`         | Ignored, resources created immediately  | Stays in 
`Submitted`, no resources created   |
   | `false`        | Resources created                       | Resources 
created (unchanged)                |
   
   ### How was this patch tested?
   
   | Test                                  | Coverage                           
                                      |
   
|---------------------------------------|--------------------------------------------------------------------------|
   | `AppInitStepTest`                     | Hold in `Submitted` and 
`ScheduledToRestart`, resume after `suspend: false` |
   | `ClusterInitStepTest`                 | Hold in `Submitted`, proceed in 
`RunningHealthy`                          |
   | `tests/e2e/suspend`                   | Suspended app / cluster has no pod 
/ StatefulSet, then patch and run to completion |
   
   `gradle build` passes locally.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Fable 5.1


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