HwangDongJun commented on code in PR #58187:
URL: https://github.com/apache/spark/pull/58187#discussion_r4163471635


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/KerberosConfDriverFeatureStep.scala:
##########
@@ -225,7 +225,10 @@ private[spark] class 
KerberosConfDriverFeatureStep(kubernetesConf: KubernetesDri
     }
   }
 
-  override def getAdditionalKubernetesResources(): Seq[HasMetadata] = {
+  // SPARK-38079: the krb5 config map, keytab secret, and delegation token 
secret below are
+  // all mounted by the driver pod, so they must be created as pre-resources 
(before the pod
+  // itself) to avoid a "configmap/secret ... not found" mount race.
+  override def getAdditionalPreKubernetesResources(): Seq[HasMetadata] = {

Review Comment:
   Same situation as the pod template ConfigMap case above — this is 
`AppInitStep`'s own re-apply logic in the operator repo, not anything 
`Client.run()` does.
   
   `Client.run()` creates each pre-resource exactly once, in the single 
owner-reference-included `serverSideApply()` call (see [the owner-reference 
reply 
above](https://github.com/apache/spark/pull/58187#discussion_r4129910475)) — it 
never force-applies the same pre-resource list a second time after the driver 
pod exists. The repeated apply you're describing is something `AppInitStep` 
does on its own when it reruns, independently of how Spark builds or creates 
these resources.
   
   I'll fold this into the same known-limitation note in the PR description as 
the pod template ConfigMap case, rather than treating it as something this PR 
can fix.



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