zgzzbws commented on code in PR #58730:
URL: https://github.com/apache/spark/pull/58730#discussion_r4044716452


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesVolumeUtils.scala:
##########
@@ -133,6 +133,16 @@ object KubernetesVolumeUtils {
           options(pathKey),
           options(serverKey))
 
+      case KUBERNETES_VOLUMES_CSI_TYPE =>
+        val driverNameKey =
+          
s"$volumeType.$volumeName.$KUBERNETES_VOLUMES_OPTIONS_CSI_DRIVER_NAME_KEY"
+        val volumeConfPrefix = s"$volumeType.$volumeName.options."
+        val attributes = options.filter { case (k, v) => 
k.startsWith(volumeConfPrefix) }
+          .map { case (k, v) => (k.substring(volumeConfPrefix.length), v) }

Review Comment:
   driver, fsType and nodePublishSecretName (name of a Secret in the pod's 
namespace) are now first-class options, and only options.volumeAttributes.* is 
swept into volumeAttributes, so keys like options.fsType can no longer leak in 
as attributes. This covers all five CSIVolumeSource fields



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