dongjoon-hyun commented on code in PR #877: URL: https://github.com/apache/spark-kubernetes-operator/pull/877#discussion_r4091202583
########## 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: Good catch, thank you. I replaced the delete commands with a safe sequence: while the operator still has the access, let the queued `SparkApplication`s finish or suspend those which have not started yet, and suspend the queued `SparkCluster`s, so that the operator releases their `Workload`s itself. Then only list the remaining `Workload`s and delete those whose owner has no running pods. -- 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]
