[SPARK-48669][K8S] K8s resource name prefix follows DNS Subdomain Names rule
#47039
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?
This PR aims to support jobs with long
spark.app.namein K8s. The resource name prefix should be truncated for the resource names to follow DNS Subdomain Names.The current used resource suffixes are as follows:
-driver-driver-podspec-conf-map-driver-pvc-$i-driver-svc-exec-${executorId}-exec-${executorId}-pvc-$i-hadoop-config-kubernetes-credentials-delegation-tokens-kerberos-keytab-krb5-fileAmong them, the longest one is
-driver-podspec-conf-mapof length 24.The max length of
-exec-${executorId}-pvc-$iis also 24, as the max length ofexecutorIdis 10 (length of Integer.MAX_VALUE) and the max allowed PVC specs is 128 of length 3.Why are the changes needed?
Currently, when a job with long
spark.app.nameis submitted, K8s will reject the creation of driver pod due to the pod name is exceeded 253.Error example:
Does this PR introduce any user-facing change?
Yes, users can run jobs on K8s with longer
spark.app.name.How was this patch tested?
Pass the CIs with the updated unit tests.
Was this patch authored or co-authored using generative AI tooling?
No.