Closed aberey closed 6 years ago
@aberey can you bring the PR up-to-date with the base branch?
Thank you for this! @aberey. This should be caught in the integration tests in the integration tests that I am writing.
@liyinan926 I just rebased the PR on the latest branch-2.2-kubernetes
- is there any other branch I should base this on?
Thanks @aberey merging.
What changes were proposed in this pull request?
This is a bugfix for PR #540 (Basic Secure HDFS Support).
The
HadoopKerberosKeytabResolverStep
currently uses the constantKERBEROS_DELEGEGATION_TOKEN_SECRET_NAME
when storing the Kerberos delegation token into a Kubernetes secret - this however causes aKubernetesClientException
stating the following as secret names are supposed to adhere to RFC 1123:The code in question is https://github.com/apache-spark-on-k8s/spark/blob/branch-2.2-kubernetes/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/submitsteps/hadoopsteps/HadoopKerberosKeytabResolverStep.scala#L102
The problem is that the current constants are using camel case, so I have changed the values to not use any uppercase characters anymore.
How was this patch tested?
This was tested manually (against a Kubernetes cluster with version v1.8.5), since the currently implemented unit tests only use mocks and the above Exception is only thrown when the actual Kubernetes API is called.