diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java index 9d7aac38a5c63..0d9d2b7fd2ebe 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataSetup.java @@ -35,6 +35,7 @@ import org.apache.pulsar.broker.resources.NamespaceResources; import org.apache.pulsar.broker.resources.PulsarResources; import org.apache.pulsar.broker.resources.TenantResources; +import org.apache.pulsar.client.api.ProxyProtocol; import org.apache.pulsar.common.conf.InternalConfigurationData; import org.apache.pulsar.common.naming.NamespaceName; import org.apache.pulsar.common.naming.SystemTopicNames; @@ -138,6 +139,16 @@ private static class Arguments { hidden = true) private String bookieMetadataServiceUri; + @Parameter(names = { "-pp", + "--proxy-protocol" }, + description = "Proxy protocol to select type of routing at proxy. Possible Values: [SNI]", + required = false) + private ProxyProtocol clusterProxyProtocol; + + @Parameter(names = { "-pu", + "--proxy-url" }, description = "Proxy-server URL to which to connect.", required = false) + private String clusterProxyUrl; + @Parameter(names = { "-h", "--help" }, description = "Show this help message") private boolean help = false; @@ -298,6 +309,8 @@ private static void initializeCluster(Arguments arguments) throws Exception { .serviceUrlTls(arguments.clusterWebServiceUrlTls) .brokerServiceUrl(arguments.clusterBrokerServiceUrl) .brokerServiceUrlTls(arguments.clusterBrokerServiceUrlTls) + .proxyServiceUrl(arguments.clusterProxyUrl) + .proxyProtocol(arguments.clusterProxyProtocol) .build(); if (!resources.getClusterResources().clusterExists(arguments.cluster)) { resources.getClusterResources().createCluster(arguments.cluster, clusterData);