attilapiros commented on code in PR #37990:
URL: https://github.com/apache/spark/pull/37990#discussion_r980053264


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/KubernetesClusterSchedulerBackend.scala:
##########
@@ -85,7 +85,7 @@ private[spark] class KubernetesClusterSchedulerBackend(
       Map(SPARK_APP_ID_LABEL -> applicationId(), SPARK_ROLE_LABEL -> 
SPARK_POD_EXECUTOR_ROLE)
     val configMap = KubernetesClientUtils.buildConfigMap(configMapName, 
confFilesMap, labels)
     KubernetesUtils.addOwnerReference(driverPod.orNull, Seq(configMap))
-    kubernetesClient.configMaps().create(configMap)
+    kubernetesClient.configMaps().inAnyNamespace().resource(configMap).create()

Review Comment:
   It will be within the namespace as the [namespace 
changes](https://github.com/fabric8io/kubernetes-client/blob/master/doc/MIGRATION-v6.md#namespace-changes)
 says
   
   > Only if the client is left at the default namespace or a call has been 
made to inAnyNamespace will the item namespace be used.
   
   And we have set the namespace on the item:
   > 
https://github.com/apache/spark/blob/ad2f40cdf423d4c5873ca21716dda464446ca127/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientUtils.scala#L97



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