jdbeck opened a new pull request #9556:
URL: https://github.com/apache/pulsar/pull/9556
Fixes #9360
### Motivation
Currently, it's valid to (via pulsar-admin and the admin rest api) specify
names that include the colon ':' character. For example, I can create a
namespace via pulsar-admin and the rest api as something like
'my:example:namespace'. We've found this useful for purposes of adding
structure to object names that is then easier to programmatically parse.
We've been able to use this format with no problems with the ProcessRuntime
for deploying functions.
The KubernetesRuntime, however, is currently not compatible with pulsar
object names that are not compliant with RFC1123, because KubernetesRuntime
attempts to use these object names verbatim in the labels it attaches to the
resource specifications.
Trying to use the KubernetesRuntime with the name format described above
prevents the functions from deploying successfully.
### Modifications
Changed the KubernetesRuntime to translate the names of the pulsar objects
to forms that are RFC1123-compliant for k8s resource labels.
This change added tests and can be verified as follows:
- Added an extra test to KubernetesRuntimeTest.java to make sure labels
are created that are RFC1123-compliant AND also make sure the labels are no
bigger than the k8s limit of 63 chars
### Does this pull request potentially affect one of the following parts:
- NONE - should be transparent to anyone using the Kubernetes function
runtime.
### Documentation
- NONE needed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]