viirya commented on code in PR #877:
URL: 
https://github.com/apache/spark-kubernetes-operator/pull/877#discussion_r4090106589


##########
docs/spark_custom_resources.md:
##########
@@ -661,7 +661,14 @@ spec:
 * `spec.suspend` takes precedence. A suspended resource does not get a 
`Workload`, and suspending
   a queued resource deletes its `Workload` to release the quota. Suspending a 
running
   `SparkCluster` deletes its `Workload` only after its master and worker pods 
are gone, since
-  terminating pods still occupy the quota. The resource is queued again when 
it is resumed.
+  terminating pods still occupy the quota. The `Workload` is deleted even if 
the
+  `kueue.x-k8s.io/queue-name` label was removed after the admission. The 
resource is queued again
+  when it is resumed with the `kueue.x-k8s.io/queue-name` label.
+* Once the access of the operator to `Workload`s is revoked, e.g. by disabling
+  `operatorRbac.kueue.enabled`, it can no longer delete them, and a `Workload` 
left behind keeps
+  its quota until its owner is deleted. Delete them before revoking the 
access, e.g. with
+  `kubectl delete workloads -A -l spark.operator/spark-app-name` and

Review Comment:
   [P1] Please avoid recommending these cluster-wide delete commands without 
first stopping the owners. Both selectors match every Spark Workload with the 
respective label, including admitted Workloads for applications and clusters 
whose pods are still running. Deleting those Workloads can release Kueue quota 
while the pods continue to use the resources—the same situation 
ClusterSuspendStep avoids by waiting for the pods to disappear before deleting 
the Workload. Could this document a safe sequence: suspend or finish the 
owners, wait for their pods to disappear, then inspect and delete only leftover 
Workloads before revoking access?



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