You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ur...@apache.org on 2022/12/01 06:01:45 UTC

[pulsar-site] branch main updated: Docs sync done from apache/pulsar(#f24a6cb)

This is an automated email from the ASF dual-hosted git repository.

urfree pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 952257b3277 Docs sync done from apache/pulsar(#f24a6cb)
952257b3277 is described below

commit 952257b32779f7e611d73187b31bda1b52c0db94
Author: Pulsar Site Updater <de...@pulsar.apache.org>
AuthorDate: Thu Dec 1 06:01:39 2022 +0000

    Docs sync done from apache/pulsar(#f24a6cb)
---
 site2/website-next/docs/admin-api-overview.md      | 100 +--------------------
 site2/website-next/docs/admin-get-started.md       |  82 +++++++++++++++++
 .../docs/functions-runtime-kubernetes.md           |  25 ++++++
 site2/website-next/sidebars.json                   |   3 +-
 .../static/swagger/restApiVersions.json            |   6 +-
 5 files changed, 113 insertions(+), 103 deletions(-)

diff --git a/site2/website-next/docs/admin-api-overview.md b/site2/website-next/docs/admin-api-overview.md
index bc3d0de528b..ae67de958b5 100644
--- a/site2/website-next/docs/admin-api-overview.md
+++ b/site2/website-next/docs/admin-api-overview.md
@@ -44,102 +44,4 @@ You can interact with the admin interface via:
 
   :::
   
-> **The REST API is the admin interface**. Both the `pulsar-admin` CLI tool and the Java client use the REST API. If you implement your own admin interface client, you should use the REST API. 
-
-## Admin setup
-
-Each of the three admin interfaces (the `pulsar-admin` CLI tool, the {@inject: rest:REST:/} API, and the [Java admin API](/api/admin)) requires some special setup if you have enabled authentication in your Pulsar instance.
-
-````mdx-code-block
-<Tabs groupId="api-choice"
-  defaultValue="pulsar-admin"
-  values={[{"label":"pulsar-admin","value":"pulsar-admin"},{"label":"REST API","value":"REST API"},{"label":"Java","value":"Java"}]}>
-<TabItem value="pulsar-admin">
-
-If you have enabled authentication, you need to provide an auth configuration to use the `pulsar-admin` tool. By default, the configuration for the `pulsar-admin` tool is in the [`conf/client.conf`](reference-configuration.md#client) file. The following are the available parameters:
-
-|Name|Description|Default|
-|----|-----------|-------|
-|webServiceUrl|The web URL for the cluster.|http://localhost:8080/|
-|brokerServiceUrl|The Pulsar protocol URL for the cluster.|pulsar://localhost:6650/|
-|authPlugin|The authentication plugin.| |
-|authParams|The authentication parameters for the cluster, as a comma-separated string.| |
-|useTls|Whether or not TLS authentication will be enforced in the cluster.|false|
-|tlsAllowInsecureConnection|Accept untrusted TLS certificate from client.|false|
-|tlsTrustCertsFilePath|Path for the trusted TLS certificate file.| |
-
-</TabItem>
-<TabItem value="REST API">
-
-You can find details for the REST API exposed by Pulsar brokers in this {@inject: rest:document:/}.
-
-</TabItem>
-<TabItem value="Java">
-
-To use the Java admin API, instantiate a {@inject: javadoc:PulsarAdmin:/admin/org/apache/pulsar/client/admin/PulsarAdmin} object, and specify a URL for a Pulsar broker and a {@inject: javadoc:PulsarAdminBuilder:/admin/org/apache/pulsar/client/admin/PulsarAdminBuilder}. The following is a minimal example using `localhost`:
-
-```java
-String url = "http://localhost:8080";
-// Pass auth-plugin class fully-qualified name if Pulsar-security enabled
-String authPluginClassName = "com.org.MyAuthPluginClass";
-// Pass auth-param if auth-plugin class requires it
-String authParams = "param1=value1";
-boolean useTls = false;
-boolean tlsAllowInsecureConnection = false;
-String tlsTrustCertsFilePath = null;
-PulsarAdmin admin = PulsarAdmin.builder()
-.authentication(authPluginClassName,authParams)
-.serviceHttpUrl(url)
-.tlsTrustCertsFilePath(tlsTrustCertsFilePath)
-.allowTlsInsecureConnection(tlsAllowInsecureConnection)
-.build();
-```
-
-If you use multiple brokers, you can use multi-host like Pulsar service. For example,
-
-```java
-String url = "http://localhost:8080,localhost:8081,localhost:8082";
-// Pass auth-plugin class fully-qualified name if Pulsar-security enabled
-String authPluginClassName = "com.org.MyAuthPluginClass";
-// Pass auth-param if auth-plugin class requires it
-String authParams = "param1=value1";
-boolean useTls = false;
-boolean tlsAllowInsecureConnection = false;
-String tlsTrustCertsFilePath = null;
-PulsarAdmin admin = PulsarAdmin.builder()
-.authentication(authPluginClassName,authParams)
-.serviceHttpUrl(url)
-.tlsTrustCertsFilePath(tlsTrustCertsFilePath)
-.allowTlsInsecureConnection(tlsAllowInsecureConnection)
-.build();
-```
-
-</TabItem>
-
-</Tabs>
-````
-
-## How to define Pulsar resource names when running Pulsar in Kubernetes
-If you run Pulsar Functions or connectors on Kubernetes, you need to follow the 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 the Kubernetes naming convention. If you create a Pulsar resource name with special characters that are not supported by Kubernetes (for example, including colons in a Pulsar namespace name), Kubernetes runtime translates the Pulsar object names into Kubernetes resource labe [...]
-
-- Truncate to 63 characters
-  
-- Replace the following characters with dashes (-):
-  
-  - Non-alphanumeric characters
-  
-  - Underscores (_)
-  
-  - Dots (.) 
-  
-- Replace beginning and ending non-alphanumeric characters with 0
-  
-:::tip
-
-- If you get an error in translating Pulsar object names into Kubernetes resource labels (for example, you may have a naming collision if your Pulsar object name is too long) or want to customize the translating rules, see [customize Kubernetes runtime](functions-runtime-kubernetes.md#customize-kubernetes-runtime).
-- For how to configure Kubernetes runtime, see [instructions](functions-runtime-kubernetes.md).
-
-:::
-
+> **The REST API is the admin interface**. Both the `pulsar-admin` CLI tool and the Java client use the REST API. If you implement your own admin interface client, you should use the REST API. 
\ No newline at end of file
diff --git a/site2/website-next/docs/admin-get-started.md b/site2/website-next/docs/admin-get-started.md
new file mode 100644
index 00000000000..a68dc556b23
--- /dev/null
+++ b/site2/website-next/docs/admin-get-started.md
@@ -0,0 +1,82 @@
+---
+id: admin-api-get-started
+title: Get started
+sidebar_label: "Get started"
+---
+
+````mdx-code-block
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+````
+
+## Admin setup
+
+Each of the three admin interfaces (the `pulsar-admin` CLI tool, the {@inject: rest:REST:/} API, and the [Java admin API](/api/admin)) requires some special setup if you have enabled authentication in your Pulsar instance.
+
+````mdx-code-block
+<Tabs groupId="api-choice"
+  defaultValue="pulsar-admin"
+  values={[{"label":"pulsar-admin","value":"pulsar-admin"},{"label":"REST API","value":"REST API"},{"label":"Java","value":"Java"}]}>
+<TabItem value="pulsar-admin">
+
+If you have enabled authentication, you need to provide an auth configuration to use the `pulsar-admin` tool. By default, the configuration for the `pulsar-admin` tool is in the [`conf/client.conf`](reference-configuration.md#client) file. The following are the available parameters:
+
+|Name|Description|Default|
+|----|-----------|-------|
+|webServiceUrl|The web URL for the cluster.|http://localhost:8080/|
+|brokerServiceUrl|The Pulsar protocol URL for the cluster.|pulsar://localhost:6650/|
+|authPlugin|The authentication plugin.| |
+|authParams|The authentication parameters for the cluster, as a comma-separated string.| |
+|useTls|Whether or not TLS authentication will be enforced in the cluster.|false|
+|tlsAllowInsecureConnection|Accept untrusted TLS certificate from client.|false|
+|tlsTrustCertsFilePath|Path for the trusted TLS certificate file.| |
+
+</TabItem>
+<TabItem value="REST API">
+
+You can find details for the REST API exposed by Pulsar brokers in this {@inject: rest:document:/}.
+
+</TabItem>
+<TabItem value="Java">
+
+To use the Java admin API, instantiate a {@inject: javadoc:PulsarAdmin:/admin/org/apache/pulsar/client/admin/PulsarAdmin} object, and specify a URL for a Pulsar broker and a {@inject: javadoc:PulsarAdminBuilder:/admin/org/apache/pulsar/client/admin/PulsarAdminBuilder}. The following is a minimal example using `localhost`.
+
+```java
+String url = "http://localhost:8080";
+// Pass auth-plugin class fully-qualified name if Pulsar-security enabled
+String authPluginClassName = "com.org.MyAuthPluginClass";
+// Pass auth-param if auth-plugin class requires it
+String authParams = "param1=value1";
+boolean tlsAllowInsecureConnection = false;
+String tlsTrustCertsFilePath = null;
+PulsarAdmin admin = PulsarAdmin.builder()
+    .authentication(authPluginClassName,authParams)
+    .serviceHttpUrl(url)
+    .tlsTrustCertsFilePath(tlsTrustCertsFilePath)
+    .allowTlsInsecureConnection(tlsAllowInsecureConnection)
+    .build();
+```
+
+If you use multiple brokers, you can use multi-host like Pulsar service. For example,
+
+```java
+String url = "http://localhost:8080,localhost:8081,localhost:8082";
+// Below are the same to the line 2 - line 13 in the code snippet above
+// Pass auth-plugin class fully-qualified name if Pulsar-security enabled
+String authPluginClassName = "com.org.MyAuthPluginClass";
+// Pass auth-param if auth-plugin class requires it
+String authParams = "param1=value1";
+boolean tlsAllowInsecureConnection = false;
+String tlsTrustCertsFilePath = null;
+PulsarAdmin admin = PulsarAdmin.builder()
+    .authentication(authPluginClassName,authParams)
+    .serviceHttpUrl(url)
+    .tlsTrustCertsFilePath(tlsTrustCertsFilePath)
+    .allowTlsInsecureConnection(tlsAllowInsecureConnection)
+    .build();
+```
+
+</TabItem>
+
+</Tabs>
+````
diff --git a/site2/website-next/docs/functions-runtime-kubernetes.md b/site2/website-next/docs/functions-runtime-kubernetes.md
index 6114a189fee..842b794ae6c 100644
--- a/site2/website-next/docs/functions-runtime-kubernetes.md
+++ b/site2/website-next/docs/functions-runtime-kubernetes.md
@@ -117,3 +117,28 @@ Below is an example of configuring `customRuntimeOptions`.
   }
 }
 ```
+
+### How to define Pulsar resource names when running Pulsar in Kubernetes
+
+If you run Pulsar Functions or connectors on Kubernetes, you need to follow the 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 the Kubernetes naming convention. If you create a Pulsar resource name with special characters that are not supported by Kubernetes (for example, including colons in a Pulsar namespace name), Kubernetes runtime translates the Pulsar object names into Kubernetes resource labe [...]
+
+- Truncate to 63 characters
+  
+- Replace the following characters with dashes (-):
+  
+  - Non-alphanumeric characters
+  
+  - Underscores (_)
+  
+  - Dots (.) 
+  
+- Replace beginning and ending non-alphanumeric characters with 0
+  
+:::tip
+
+- If you get an error in translating Pulsar object names into Kubernetes resource labels (for example, you may have a naming collision if your Pulsar object name is too long) or want to customize the translating rules, see [customize Kubernetes runtime](functions-runtime-kubernetes.md#customize-kubernetes-runtime).
+- For how to configure Kubernetes runtime, see [instructions](functions-runtime-kubernetes.md).
+
+:::
\ No newline at end of file
diff --git a/site2/website-next/sidebars.json b/site2/website-next/sidebars.json
index 630ce31f8a9..db88d61e27d 100644
--- a/site2/website-next/sidebars.json
+++ b/site2/website-next/sidebars.json
@@ -318,9 +318,10 @@
     },
     {
       "type": "category",
-      "label": "Admin Interfaces",
+      "label": "Admin API",
       "items": [
         "admin-api-overview",
+        "admin-api-get-started",
         "admin-api-clusters",
         "admin-api-tenants",
         "admin-api-brokers",
diff --git a/site2/website-next/static/swagger/restApiVersions.json b/site2/website-next/static/swagger/restApiVersions.json
index 1d4f2163812..6307447cac6 100644
--- a/site2/website-next/static/swagger/restApiVersions.json
+++ b/site2/website-next/static/swagger/restApiVersions.json
@@ -33,7 +33,7 @@
             ]
         }
     ],
-    "2.3.0": [
+    "2.10.2": [
         {
             "version": "v2",
             "fileName": [
@@ -44,12 +44,13 @@
             "version": "v3",
             "fileName": [
                 "swaggerfunctions",
+                "swaggerpackages",
                 "swaggersink",
                 "swaggersource"
             ]
         }
     ],
-    "2.10.2": [
+    "2.3.0": [
         {
             "version": "v2",
             "fileName": [
@@ -60,7 +61,6 @@
             "version": "v3",
             "fileName": [
                 "swaggerfunctions",
-                "swaggerpackages",
                 "swaggersink",
                 "swaggersource"
             ]