Close ZK connections at end of metadata setup
### Modifications
When deploying Pulsar in Kubernetes, the zookeeper-metadata job does not reach completed status with ZooKeeper TLS enabled. These changes close the ZooKeeper connections before exiting therefore the Kubernetes job is marked as completed.
@@ -239,6 +239,9 @@ public class PulsarClusterMetadataSetup {
// Create transaction coordinator assign partitioned topic
createPartitionedTopic(configStoreZk, TopicName.TRANSACTION_COORDINATOR_ASSIGN, arguments.numTransactionCoordinators);
+ localZk.close();
+ configStoreZk.close();
+
log.info("Cluster metadata for '{}' setup correctly", arguments.cluster);
}
