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/20 05:21:02 UTC

[GitHub] [pulsar] Anonymitaet opened a new pull request #9651: [Doc] Add descriptions for KubernetesRuntime

Anonymitaet opened a new pull request #9651:
URL: https://github.com/apache/pulsar/pull/9651


   Add docs for 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] Anonymitaet commented on pull request #9651: [Doc] Add descriptions for KubernetesRuntime

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


   @jdbeck @freeznet @nlu90 could you please help review? Thank you


----------------------------------------------------------------
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 a change in pull request #9651: [Doc] Add descriptions for KubernetesRuntime

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9651:
URL: https://github.com/apache/pulsar/pull/9651#discussion_r579795163



##########
File path: site2/docs/admin-api-overview.md
##########
@@ -87,4 +87,22 @@ PulsarAdmin admin = PulsarAdmin.builder()
 ## How to define Pulsar resource names when running Pulsar in Kubernetes
 If you run Pulsar Functions or connectors on Kubernetes, you need to follow Kubernetes naming convention to define the names of your Pulsar resources, whichever admin interface you use.
 
-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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), you cannot run functions or connectors using Kubernetes runtime.
\ No newline at end of file
+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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), KubernetesRuntime translates the Pulsar object names to the RFC1123-compliant forms for Kubernetes resource labels. Consequently, you can run functions or connectors using Kubernetes runtime. The rules for translating Pulsar object names to Kubernetes resource labels are as below:
+
+- Truncate to 63 characters
+  
+- Replace the following characters with dashes (-):
+  
+  - Non alphanumeric characters ([a-z0-9A-Z])
+  
+  - Underscores (_)
+  
+  - Dot (.) 
+  
+- Replace beginning and end non-alphanumeric characters with 0
+  
+> #### Tip
+> 
+> - If you get an error in translating Pulsar object names for Kubernetes resource labels or want to customize the translating rules, see [Customize Kubernetes runtime](https://pulsar.apache.org/docs/en/next/functions-runtime/#customize-kubernetes-runtime).
+> 
+> - For how to configure Kubernetes runtime, see [here](https://pulsar.apache.org/docs/en/next/functions-runtime/#configure-kubernetes-runtime).

Review comment:
       Kubernetes runtime. Thanks for reminding me.




----------------------------------------------------------------
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] Jennifer88huang commented on a change in pull request #9651: [Doc] Add descriptions for KubernetesRuntime

Posted by GitBox <gi...@apache.org>.
Jennifer88huang commented on a change in pull request #9651:
URL: https://github.com/apache/pulsar/pull/9651#discussion_r579908819



##########
File path: site2/docs/admin-api-overview.md
##########
@@ -87,4 +87,22 @@ PulsarAdmin admin = PulsarAdmin.builder()
 ## How to define Pulsar resource names when running Pulsar in Kubernetes
 If you run Pulsar Functions or connectors on Kubernetes, you need to follow Kubernetes naming convention to define the names of your Pulsar resources, whichever admin interface you use.
 
-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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), you cannot run functions or connectors using Kubernetes runtime.
\ No newline at end of file
+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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), KubernetesRuntime translates the Pulsar object names to the RFC1123-compliant forms for Kubernetes resource labels. Consequently, you can run functions or connectors using Kubernetes runtime. The rules for translating Pulsar object names to Kubernetes resource labels are as below:
+
+- Truncate to 63 characters
+  
+- Replace the following characters with dashes (-):
+  
+  - Non alphanumeric characters ([a-z0-9A-Z])
+  
+  - Underscores (_)
+  
+  - Dot (.) 
+  
+- Replace beginning and end non-alphanumeric characters with 0
+  
+> #### Tip

Review comment:
       Yes, for "note/tip", we use bold font for them, see https://developers.google.com/style/notices
   Besides, heading is used to clarify the structure; usually we do not skip levels of the heading hierarchy, see https://developers.google.com/style/headings
   So it's better to use bold font for note/tip rather than heading.
   
   




----------------------------------------------------------------
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 #9651: [Doc] Add descriptions for KubernetesRuntime

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


   @Huanli-Meng thanks for your comments, I've incorporated some of them, PTAL


----------------------------------------------------------------
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 a change in pull request #9651: [Doc] Add descriptions for KubernetesRuntime

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9651:
URL: https://github.com/apache/pulsar/pull/9651#discussion_r579794937



##########
File path: site2/docs/admin-api-overview.md
##########
@@ -87,4 +87,22 @@ PulsarAdmin admin = PulsarAdmin.builder()
 ## How to define Pulsar resource names when running Pulsar in Kubernetes
 If you run Pulsar Functions or connectors on Kubernetes, you need to follow Kubernetes naming convention to define the names of your Pulsar resources, whichever admin interface you use.
 
-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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), you cannot run functions or connectors using Kubernetes runtime.
\ No newline at end of file
+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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), KubernetesRuntime translates the Pulsar object names to the RFC1123-compliant forms for Kubernetes resource labels. Consequently, you can run functions or connectors using Kubernetes runtime. The rules for translating Pulsar object names to Kubernetes resource labels are as below:
+
+- Truncate to 63 characters
+  
+- Replace the following characters with dashes (-):
+  
+  - Non alphanumeric characters ([a-z0-9A-Z])
+  
+  - Underscores (_)
+  
+  - Dot (.) 
+  
+- Replace beginning and end non-alphanumeric characters with 0
+  
+> #### Tip

Review comment:
       @Jennifer88huang for a note/tip, you have changed #### to ****?




----------------------------------------------------------------
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] Huanli-Meng commented on a change in pull request #9651: [Doc] Add descriptions for KubernetesRuntime

Posted by GitBox <gi...@apache.org>.
Huanli-Meng commented on a change in pull request #9651:
URL: https://github.com/apache/pulsar/pull/9651#discussion_r579625534



##########
File path: site2/docs/admin-api-overview.md
##########
@@ -87,4 +87,22 @@ PulsarAdmin admin = PulsarAdmin.builder()
 ## How to define Pulsar resource names when running Pulsar in Kubernetes
 If you run Pulsar Functions or connectors on Kubernetes, you need to follow Kubernetes naming convention to define the names of your Pulsar resources, whichever admin interface you use.
 
-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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), you cannot run functions or connectors using Kubernetes runtime.
\ No newline at end of file
+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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), KubernetesRuntime translates the Pulsar object names to the RFC1123-compliant forms for Kubernetes resource labels. Consequently, you can run functions or connectors using Kubernetes runtime. The rules for translating Pulsar object names to Kubernetes resource labels are as below:

Review comment:
       ```suggestion
   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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that are not supported by Kubernetes (for example, colons in a Pulsar namespace name), Kubernetes Runtime translates the Pulsar object names into Kubernetes resource labels which are in RFC 1123-compliant forms. Consequently, you can run functions or connectors using Kubernetes runtime. The rules for translating Pulsar object names into Kubernetes resource labels are as below:
   ```

##########
File path: site2/docs/admin-api-overview.md
##########
@@ -87,4 +87,22 @@ PulsarAdmin admin = PulsarAdmin.builder()
 ## How to define Pulsar resource names when running Pulsar in Kubernetes
 If you run Pulsar Functions or connectors on Kubernetes, you need to follow Kubernetes naming convention to define the names of your Pulsar resources, whichever admin interface you use.
 
-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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), you cannot run functions or connectors using Kubernetes runtime.
\ No newline at end of file
+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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), KubernetesRuntime translates the Pulsar object names to the RFC1123-compliant forms for Kubernetes resource labels. Consequently, you can run functions or connectors using Kubernetes runtime. The rules for translating Pulsar object names to Kubernetes resource labels are as below:
+
+- Truncate to 63 characters

Review comment:
       my suggestions:
   
   - change the word `Truncate` to a more -commonly-used word
   - Non-alphanumeric characters should not include a-z, A-Z,0-9
   - should be dots(.)
   Here is the sentence used in Kubernetes docs, just for your information:
   `The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. `

##########
File path: site2/docs/admin-api-overview.md
##########
@@ -87,4 +87,22 @@ PulsarAdmin admin = PulsarAdmin.builder()
 ## How to define Pulsar resource names when running Pulsar in Kubernetes
 If you run Pulsar Functions or connectors on Kubernetes, you need to follow Kubernetes naming convention to define the names of your Pulsar resources, whichever admin interface you use.
 
-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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), you cannot run functions or connectors using Kubernetes runtime.
\ No newline at end of file
+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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), KubernetesRuntime translates the Pulsar object names to the RFC1123-compliant forms for Kubernetes resource labels. Consequently, you can run functions or connectors using Kubernetes runtime. The rules for translating Pulsar object names to Kubernetes resource labels are as below:
+
+- Truncate to 63 characters
+  
+- Replace the following characters with dashes (-):
+  
+  - Non alphanumeric characters ([a-z0-9A-Z])
+  
+  - Underscores (_)
+  
+  - Dot (.) 
+  
+- Replace beginning and end non-alphanumeric characters with 0
+  
+> #### Tip
+> 
+> - If you get an error in translating Pulsar object names for Kubernetes resource labels or want to customize the translating rules, see [Customize Kubernetes runtime](https://pulsar.apache.org/docs/en/next/functions-runtime/#customize-kubernetes-runtime).

Review comment:
       ```suggestion
   > - If you get an error in translating Pulsar object names into Kubernetes resource labels or want to customize the translating rules, see [Customize Kubernetes runtime](https://pulsar.apache.org/docs/en/next/functions-runtime/#customize-kubernetes-runtime).
   ```

##########
File path: site2/docs/admin-api-overview.md
##########
@@ -87,4 +87,22 @@ PulsarAdmin admin = PulsarAdmin.builder()
 ## How to define Pulsar resource names when running Pulsar in Kubernetes
 If you run Pulsar Functions or connectors on Kubernetes, you need to follow Kubernetes naming convention to define the names of your Pulsar resources, whichever admin interface you use.
 
-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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), you cannot run functions or connectors using Kubernetes runtime.
\ No newline at end of file
+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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), KubernetesRuntime translates the Pulsar object names to the RFC1123-compliant forms for Kubernetes resource labels. Consequently, you can run functions or connectors using Kubernetes runtime. The rules for translating Pulsar object names to Kubernetes resource labels are as below:
+
+- Truncate to 63 characters
+  
+- Replace the following characters with dashes (-):
+  
+  - Non alphanumeric characters ([a-z0-9A-Z])
+  
+  - Underscores (_)
+  
+  - Dot (.) 
+  
+- Replace beginning and end non-alphanumeric characters with 0
+  
+> #### Tip

Review comment:
       It seems now we do not user heading 4 for Note/Tip, we use ">**Tip**", you can double confirm with Jennifer

##########
File path: site2/docs/admin-api-overview.md
##########
@@ -87,4 +87,22 @@ PulsarAdmin admin = PulsarAdmin.builder()
 ## How to define Pulsar resource names when running Pulsar in Kubernetes
 If you run Pulsar Functions or connectors on Kubernetes, you need to follow Kubernetes naming convention to define the names of your Pulsar resources, whichever admin interface you use.
 
-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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), you cannot run functions or connectors using Kubernetes runtime.
\ No newline at end of file
+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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), KubernetesRuntime translates the Pulsar object names to the RFC1123-compliant forms for Kubernetes resource labels. Consequently, you can run functions or connectors using Kubernetes runtime. The rules for translating Pulsar object names to Kubernetes resource labels are as below:
+
+- Truncate to 63 characters
+  
+- Replace the following characters with dashes (-):
+  
+  - Non alphanumeric characters ([a-z0-9A-Z])
+  
+  - Underscores (_)
+  
+  - Dot (.) 
+  
+- Replace beginning and end non-alphanumeric characters with 0
+  
+> #### Tip
+> 
+> - If you get an error in translating Pulsar object names for Kubernetes resource labels or want to customize the translating rules, see [Customize Kubernetes runtime](https://pulsar.apache.org/docs/en/next/functions-runtime/#customize-kubernetes-runtime).
+> 
+> - For how to configure Kubernetes runtime, see [here](https://pulsar.apache.org/docs/en/next/functions-runtime/#configure-kubernetes-runtime).

Review comment:
       ```suggestion
   > - For detail about how to configure Kubernetes runtime, see [here](https://pulsar.apache.org/docs/en/next/functions-runtime/#configure-kubernetes-runtime).
   ```
   More, Kubernetes runtime or Kubernetes Runtime? I think it should be consistent.




----------------------------------------------------------------
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 #9651: [Doc] Add descriptions for KubernetesRuntime

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


   @Jennifer88huang  thanks for your comments, I've incorporated them, PTAL


----------------------------------------------------------------
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 merged pull request #9651: [Doc] Add descriptions for KubernetesRuntime

Posted by GitBox <gi...@apache.org>.
Anonymitaet merged pull request #9651:
URL: 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] Jennifer88huang commented on a change in pull request #9651: [Doc] Add descriptions for KubernetesRuntime

Posted by GitBox <gi...@apache.org>.
Jennifer88huang commented on a change in pull request #9651:
URL: https://github.com/apache/pulsar/pull/9651#discussion_r579909617



##########
File path: site2/docs/functions-runtime.md
##########
@@ -286,6 +286,7 @@ Below is an example of `customRuntimeOptions`.
 
 ```Json

Review comment:
       ```suggestion
   ```json
   ```




----------------------------------------------------------------
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 a change in pull request #9651: [Doc] Add descriptions for KubernetesRuntime

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on a change in pull request #9651:
URL: https://github.com/apache/pulsar/pull/9651#discussion_r579794716



##########
File path: site2/docs/admin-api-overview.md
##########
@@ -87,4 +87,22 @@ PulsarAdmin admin = PulsarAdmin.builder()
 ## How to define Pulsar resource names when running Pulsar in Kubernetes
 If you run Pulsar Functions or connectors on Kubernetes, you need to follow Kubernetes naming convention to define the names of your Pulsar resources, whichever admin interface you use.
 
-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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), you cannot run functions or connectors using Kubernetes runtime.
\ No newline at end of file
+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). Pulsar supports more legal characters than Kubernetes naming convention. If you create a Pulsar resource name with special characters that is not supported by Kubernetes (for example, including colons in a Pulsar namespace name), KubernetesRuntime translates the Pulsar object names to the RFC1123-compliant forms for Kubernetes resource labels. Consequently, you can run functions or connectors using Kubernetes runtime. The rules for translating Pulsar object names to Kubernetes resource labels are as below:
+
+- Truncate to 63 characters

Review comment:
       Thanks for your comments, I've incorporated them. But for `truncate`, it is commonly used in the software world. An example is [here](https://www.sqltutorial.org/sql-math-functions/sql-truncate/#:~:text=The%20TRUNCATE()%20function%20returns,both%20n%20and%20d%20arguments).




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