You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/01/28 22:14:28 UTC

[GitHub] [pulsar] csthomas1 opened a new issue #9360: KubernetesRuntime translates pulsar object names to values that are RFC1123-compliant when generating Kubernetes Resource Specs

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


   **Is your enhancement request related to a problem? Please describe.**
   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.
   
   More detail provided by @sijie :
   ```
   there is a disconnection pulsar name verification and kubernetes name verification. Pulsar supports more legal characters than kubernetes naming convention. The disconnection causes an issue when using KubernetesRuntime to run functions and connectors. Kubernetes requires a name that can be used as a DNS subdomain name as defined in RFC 1123 (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). If the name doesn’t follow the rule, you will fail to run functions/connectors using kubernetes runtime.
   However, we can’t change the pulsar naming convention to use the DNS subdomain name convention because there are already many applications built before we introduce functions.
   ```
   
   **Describe the solution you'd like**
   The KubernetesRuntime could translate the names of the pulsar objects to forms that are RFC1123-compliant. This could be as simple as replacing all illegal characters with a '-', for example. The KubernetesRuntime already does something similar in generating the pod names.
   
   **Describe alternatives you've considered**
   Without this feature, we'll need to either change our naming convention (which works well for us) or go back to using the ProcessRuntime. We'd really like to be able to use the KubernetesRuntime for the scaling benefits.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] freeznet commented on issue #9360: KubernetesRuntime translates pulsar object names to values that are RFC1123-compliant when generating Kubernetes Resource Specs

Posted by GitBox <gi...@apache.org>.
freeznet commented on issue #9360:
URL: https://github.com/apache/pulsar/issues/9360#issuecomment-771334421


   @csthomas1 yes we should create a conversion for namespace as well like we do for the pod names. But I think Pulsar already provide a `ManifestCustomizer` interface for k8s, so you can implement the interface to make your own customizer. Also pr is welcome to add the rfc1123 conversion for namespace in k8s runtime.
   
   ref: https://github.com/apache/pulsar/blob/db6afd52841108b0c35f0a0bdd0759f5243d93e0/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesManifestCustomizer.java#L36


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] sijie closed issue #9360: KubernetesRuntime translates pulsar object names to values that are RFC1123-compliant when generating Kubernetes Resource Specs

Posted by GitBox <gi...@apache.org>.
sijie closed issue #9360:
URL: https://github.com/apache/pulsar/issues/9360


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] freeznet commented on issue #9360: KubernetesRuntime translates pulsar object names to values that are RFC1123-compliant when generating Kubernetes Resource Specs

Posted by GitBox <gi...@apache.org>.
freeznet commented on issue #9360:
URL: https://github.com/apache/pulsar/issues/9360#issuecomment-771334421


   @csthomas1 yes we should create a conversion for namespace as well like we do for the pod names. But I think Pulsar already provide a `ManifestCustomizer` interface for k8s, so you can implement the interface to make your own customizer. Also pr is welcome to add the rfc1123 conversion for namespace in k8s runtime.
   
   ref: https://github.com/apache/pulsar/blob/db6afd52841108b0c35f0a0bdd0759f5243d93e0/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesManifestCustomizer.java#L36


----------------------------------------------------------------
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:
users@infra.apache.org