csthomas1 opened a new issue #8012:
URL: https://github.com/apache/pulsar/issues/8012


   **Is your enhancement request related to a problem? Please describe.**
   Currently (as of 2.6.x), the Pulsar KubernetesRuntime class hardcodes the 
jobName (the name assigned to the StatefulSet used to create the function pods) 
to the format "pf-<tenant>-<namespace>-<function>[-<8 char hash>]." While the 
intent of this name format was no doubt both to provide a human readable name 
for the k8s objects and ensure uniqueness within k8s, we've found it -- when 
combined with the 55 character size restriction imposed by KubernetesRuntime -- 
to be unnecessarily limiting. In our environment, we ensure that Pulsar 
functions under a particular Pulsar tenant deploy into a kubernetes namespace 
dedicated to that tenant; hence, for us the <tenant> portion of the function 
name is redundant. Further, the "pf-" prefix is unnecessary, as we're able to 
distinguish the function pods from other pods based on the function name alone. 
These issues may seem minor, but they consume precious characters against the 
55 character max!
   
   **Describe the solution you'd like**
   Allow us to set the k8s jobName as a custom runtime parameter (similar to 
jobNamespace). Attach labels to the k8s StatefulSet to separately identify the 
corresponding Pulsar tenant, namespace, and function so as to enable the 
Function worker to locate and clean up the StatefulSet when requested.
   
   **Describe alternatives you've considered**
   We briefly considered writing an implementation of the 
KubernetesManifestCustomizer interface that could replace the generated job 
name with a custom version, but then observed that the KubernetesRuntime class 
would reset it to the generated value.
   
   **Additional context**
   Add any other context or screenshots about the feature request here.
   


----------------------------------------------------------------
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]


Reply via email to