zeppelin
zeppelin copied to clipboard
[ZEPPELIN-5901] k8s interpreter pod launch fails
What is this PR for?
A few sentences describing the overall goals of the pull request's commits. K8S labels has specific requirement to name labels which can be found here https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
if Using external auth like Shiro with OIDC or JWT where principal is name / or username or email it can have special chars which then does not allow pod to launch.
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://172.20.0.1/api/v1/namespaces/dbdwf06018702/pods. Message: Pod "jdbc-nrgtbo" is invalid: metadata.labels: Invalid value: "Firstname Lastname": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character ...
What type of PR is it?
Bug Fix
What is the Jira issue?
How should this be tested?
- Strongly recommended: add automated unit tests for any new or changed behavior
- Outline any manual steps to test the PR here.
Questions:
- Does the license files need to update? -NO
- Is there breaking changes for older versions? -NO
- Does this needs documentation? - NO
Hello @grizzly-monkey,
thanks for your Pull Request.
We already have a sanitize method. Have a look at K8sUtils:generateK8sName
. Please use this method or adapt the method to your needs.
when does it get merged ?
when does it get merged ?
When all tests have been successfully completed.
Fixed the tests.
I created https://github.com/grizzly-monkey/zeppelin/pull/1 to fix this feature.
ping @grizzly-monkey