[SPARK-50758][K8S] Mounts the krb5 config map on the executor pod - #58464
Open
maomaodev wants to merge 1 commit into
Open
[SPARK-50758][K8S] Mounts the krb5 config map on the executor pod#58464maomaodev wants to merge 1 commit into
maomaodev wants to merge 1 commit into
Conversation
Author
|
@pan3793 Could you please take a look when you have time? Thanks! |
Member
|
I updated the PR title ever so slightly (space nit) |
Member
|
Change seems correct to me, but adding @pan3793 to review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
In this pr, for spark on k8s, the krb5.conf config map will be mounted in executor side as well. Before, the krb5.conf config map is only mounted in driver side. But according to the parameter description (
spark.kubernetes.kerberos.krb5.pathandspark.kubernetes.kerberos.krb5.configMapName), the krb5.conf file should be mounted on both the driver and the executor.This is the second attempt of #49467, which added the ability to mount the
krb5.confConfigMap on executor pods. The first attempt only worked in cluster mode; this follow-up adds client mode compatibility. The two modes work as follows:KerberosConfDriverFeatureStep(driver pod)<resourceNamePrefix>-krb5-fileKubernetesClusterSchedulerBackend.setUpExecutorKrb5ConfigMapspark-krb5-<uniqueID>-conf-mapBoth paths write
KRB_CONFIG_MAP_NAMEinto the executorSparkConf, andKerberosConfExecutorFeatureStepreads it to mount/etc/krb5.conf.Why are the changes needed?
After SPARK-43504, the hadoop config map will be mounted on the executor pod.
Now the executor pod fails to start because the hadoop conf file contains Kerberos authentication configuration, but the executor does not mount krb5.conf correctly. See the #41181 discuss.
Does this PR introduce any user-facing change?
Yes, users do not need to take workarounds to make executors load the krb5.conf. Such as:
How was this patch tested?
Added UT:
KerberosConfExecutorFeatureStepSuite— mount / no-op / driver-step publishing.KubernetesClusterSchedulerBackendSuite—setUpExecutorKrb5ConfigMapcovers 4 branches (no krb5 config / cluster mode already set / user-provided ConfigMap / local file).KerberosConfDriverFeatureStepSuite— updated assertions for the published system property.Was this patch authored or co-authored using generative AI tooling?
Generated-by: DeepSeek-V4-Pro