This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 361ece3b9747 [SPARK-55704][K8S] Add 
`Constants.DEFAULT_PVC_ACCESS_MODE` for reuse
361ece3b9747 is described below

commit 361ece3b9747d691486e505689e1115208c435d5
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Wed Feb 25 23:23:09 2026 -0800

    [SPARK-55704][K8S] Add `Constants.DEFAULT_PVC_ACCESS_MODE` for reuse
    
    ### What changes were proposed in this pull request?
    
    This PR aims to add `Constants.DEFAULT_PVC_ACCESS_MODE` for reuse.
    
    ### Why are the changes needed?
    
    To allow the downstream projects like `Apache Spark K8s Operator` to reuse 
this constant.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    Generated-by: `Gemini 3.1 Pro (High)` on `Antigravity`
    
    Closes #54503 from dongjoon-hyun/SPARK-55704.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../core/src/main/scala/org/apache/spark/deploy/k8s/Constants.scala  | 1 +
 .../apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala   | 5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Constants.scala
 
b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Constants.scala
index d9b3c3df945a..4ffd617c4e4c 100644
--- 
a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Constants.scala
+++ 
b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Constants.scala
@@ -105,6 +105,7 @@ object Constants {
   val KUBERNETES_MASTER_INTERNAL_URL = "https://kubernetes.default.svc";
   val DEFAULT_DRIVER_CONTAINER_NAME = "spark-kubernetes-driver"
   val DEFAULT_EXECUTOR_CONTAINER_NAME = "spark-kubernetes-executor"
+  val DEFAULT_PVC_ACCESS_MODE = "ReadWriteOncePod"
   val NON_JVM_MEMORY_OVERHEAD_FACTOR = 0.4d
   val CONNECT_GRPC_BINDING_PORT = "spark.connect.grpc.binding.port"
   val EXIT_EXCEPTION_ANNOTATION = "spark.exit-exception"
diff --git 
a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala
 
b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala
index 3d89696f19fc..d851ba01cf68 100644
--- 
a/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala
+++ 
b/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala
@@ -23,7 +23,7 @@ import io.fabric8.kubernetes.api.model._
 
 import org.apache.spark.deploy.k8s._
 import org.apache.spark.deploy.k8s.Config.KUBERNETES_USE_LEGACY_PVC_ACCESS_MODE
-import org.apache.spark.deploy.k8s.Constants.{ENV_EXECUTOR_ID, 
SPARK_APP_ID_LABEL}
+import org.apache.spark.deploy.k8s.Constants.{DEFAULT_PVC_ACCESS_MODE, 
ENV_EXECUTOR_ID, SPARK_APP_ID_LABEL}
 
 private[spark] class MountVolumesFeatureStep(conf: KubernetesConf)
   extends KubernetesFeatureConfigStep {
@@ -33,7 +33,7 @@ private[spark] class MountVolumesFeatureStep(conf: 
KubernetesConf)
   val accessMode = if (conf.get(KUBERNETES_USE_LEGACY_PVC_ACCESS_MODE)) {
     "ReadWriteOnce"
   } else {
-    PVC_ACCESS_MODE
+    DEFAULT_PVC_ACCESS_MODE
   }
 
   override def configurePod(pod: SparkPod): SparkPod = {
@@ -142,5 +142,4 @@ private[spark] object MountVolumesFeatureStep {
   val PVC_ON_DEMAND = "OnDemand"
   val PVC = "PersistentVolumeClaim"
   val PVC_POSTFIX = "-pvc"
-  val PVC_ACCESS_MODE = "ReadWriteOncePod"
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to