You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/09/15 03:51:35 UTC

[GitHub] [spark] haodemon commented on a change in pull request #33675: [SPARK-27997][K8S] Add support for kubernetes OAuth Token refresh

haodemon commented on a change in pull request #33675:
URL: https://github.com/apache/spark/pull/33675#discussion_r708815943



##########
File path: resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/SparkKubernetesClientFactory.scala
##########
@@ -92,7 +101,9 @@ private[spark] object SparkKubernetesClientFactory extends Logging {
       .withRequestTimeout(clientType.requestTimeout(sparkConf))
       .withConnectionTimeout(clientType.connectionTimeout(sparkConf))
       .withTrustCerts(sparkConf.get(KUBERNETES_TRUST_CERTIFICATES))
-      .withOption(oauthTokenValue) {
+      .withOption(oauthTokenProviderInstance) {
+        (provider, configBuilder) => configBuilder.withOauthTokenProvider(provider)
+      }.withOption(oauthTokenValue) {

Review comment:
        I prepared the changes, so now we have:
   
   • `OAuthTokenProvider` options are now consistent with the other two options – `OAuthToken` and `OAuthTokenFile`.
   • Added an assertion that only one of the options is set (either `OAuthToken`, `OAuthTokenFile` or `OAuthTokenProvider`
   • Added docs
   
   I have tested this in client mode on Kubernetes.




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org