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/02/10 20:48:37 UTC

[GitHub] [pulsar] jdbeck opened a new pull request #9556: [Issue 9360][pulsar-functions] kubernetes runtime functions create rfc1123 compliant labels

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



[GitHub] [pulsar] sijie commented on pull request #9556: [Issue 9360][pulsar-functions] kubernetes runtime functions create rfc1123 compliant labels

Posted by GitBox <gi...@apache.org>.
sijie commented on pull request #9556:
URL: https://github.com/apache/pulsar/pull/9556#issuecomment-777154201


   @freeznet @nlu90 Can you review this pull request?


----------------------------------------------------------------
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] jdbeck commented on pull request #9556: [Issue 9360][pulsar-functions] kubernetes runtime functions create rfc1123 compliant labels

Posted by GitBox <gi...@apache.org>.
jdbeck commented on pull request #9556:
URL: https://github.com/apache/pulsar/pull/9556#issuecomment-777143023


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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] Anonymitaet commented on pull request #9556: [Issue 9360][pulsar-functions] kubernetes runtime functions create rfc1123 compliant labels

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #9556:
URL: https://github.com/apache/pulsar/pull/9556#issuecomment-784914616


   Done in https://github.com/apache/pulsar/pull/9651


----------------------------------------------------------------
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] jdbeck commented on pull request #9556: [Issue 9360][pulsar-functions] kubernetes runtime functions create rfc1123 compliant labels

Posted by GitBox <gi...@apache.org>.
jdbeck commented on pull request #9556:
URL: https://github.com/apache/pulsar/pull/9556#issuecomment-781792781


   Hi @Anonymitaet,
   
   That looks good.  Your suggestions for the updates are correct.  
   
   I'm also wondering if you should mention or link to this document as well:  https://pulsar.apache.org/docs/en/next/functions-runtime/
   
   It contains other useful information for making sure you setup your pulsar resources correctly to work within Kubernetes without issue.  You could point out the customizable options in CustomRuntimeOptions for 'JobName' and 'JobNamespace'.  Having those available can also help a user not run into k8s issues with pod names being too long by default (pf-<tenant>-<namepace>-<function_name>) if you have defined long tenant, namespace, and function names in Pulsar when creating functions on the Kubernetes runtime.  


----------------------------------------------------------------
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] Anonymitaet commented on pull request #9556: [Issue 9360][pulsar-functions] kubernetes runtime functions create rfc1123 compliant labels

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #9556:
URL: https://github.com/apache/pulsar/pull/9556#issuecomment-782563293


   Hi @jdbeck many thanks for your explanations, I've updated the doc accordingly, could you please help review https://github.com/apache/pulsar/pull/9651? Thanks again


----------------------------------------------------------------
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] Anonymitaet commented on pull request #9556: [Issue 9360][pulsar-functions] kubernetes runtime functions create rfc1123 compliant labels

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #9556:
URL: https://github.com/apache/pulsar/pull/9556#issuecomment-781099128


   Hi @jdbeck 
   
   Currently, we have related docs [here](https://pulsar.apache.org/docs/en/next/admin-api-overview/#how-to-define-pulsar-resource-names-when-running-pulsar-in-kubernetes).
   
   
   Should we update the doc? I've made some suggestions [here](https://docs.google.com/document/d/1B2dBRgV1PRRXaKPNRnQ2Tzif4Lb-Lb2kbZqrpUVIWPg/edit#). Please correct me if my understanding is wrong, thanks.
   
   
   


----------------------------------------------------------------
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 merged pull request #9556: [Issue 9360][pulsar-functions] kubernetes runtime functions create rfc1123 compliant labels

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #9556:
URL: https://github.com/apache/pulsar/pull/9556


   


----------------------------------------------------------------
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 commented on pull request #9556: [Issue 9360][pulsar-functions] kubernetes runtime functions create rfc1123 compliant labels

Posted by GitBox <gi...@apache.org>.
sijie commented on pull request #9556:
URL: https://github.com/apache/pulsar/pull/9556#issuecomment-779677437


   @nlu90 Great suggestion! I have updated the rules to the PR description.


----------------------------------------------------------------
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] jdbeck commented on pull request #9556: [Issue 9360][pulsar-functions] kubernetes runtime functions create rfc1123 compliant labels

Posted by GitBox <gi...@apache.org>.
jdbeck commented on pull request #9556:
URL: https://github.com/apache/pulsar/pull/9556#issuecomment-777112746


   /pulsarbot run-failure-checks


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