Cluster Configuration Overview
The config
section in a PulsarCluster specification allows users to configure the features and settings to be used for their Pulsar cluster. This topic aims to provide a comprehensive overview of the available configuration options, helping users tailor their Pulsar clusters to specific requirements and use cases.
Available Configuration Options
The available settings in config
section in a PulsarCluster specification can be grouped into the following three categories:
- Cluster Features: These settings control the various features and functionalities of your Pulsar cluster.
- Protocols: This setting allows you to configure the supported protocols for your Pulsar cluster, including Kafka, AMQP, MQTT, and Websocket.
- Cluster Settings: This setting allows you to configure custom cluster settings for your Pulsar cluster.
The detailed descriptions of the available settings are as follows:
The config
section in a PulsarCluster specification includes the following key components:
Category | Configuration Option | Description |
---|---|---|
Features | FunctionEnabled | Controls whether Pulsar Functions are enabled |
Features | TransactionEnabled | Controls whether Pulsar Transactions are enabled |
Features | AuditLog | Configures audit log settings |
Protocols | Protocols | Configures supported protocols (Kafka, AMQP, MQTT) |
Protocols | WebsocketEnabled | Controls whether WebSocket protocol is enabled |
Settings | Custom | Allows for custom cluster settings |
Update Cluster Configuration
To update the cluster configuration, you can use one of the following methods:
In the cluster provision process, when you select a release channel, you can choose to enable or disable the cluster features and protocols based on your requirements. You can also click the “Add optional custom configuration” to set custom cluster settings for your Pulsar cluster.
After cluster is provisioned, you can view the current cluster configuration through the “Configuration” page of your Pulsar cluster. You can also update the cluster configuration by clicking the “Edit Cluster” button at the top right corner of the page. You will be redirected to the same configuration page you see in the provision process, where you can make the desired changes to the configuration options.
In the cluster provision process, when you select a release channel, you can choose to enable or disable the cluster features and protocols based on your requirements. You can also click the “Add optional custom configuration” to set custom cluster settings for your Pulsar cluster.
After cluster is provisioned, you can view the current cluster configuration through the “Configuration” page of your Pulsar cluster. You can also update the cluster configuration by clicking the “Edit Cluster” button at the top right corner of the page. You will be redirected to the same configuration page you see in the provision process, where you can make the desired changes to the configuration options.
To update the cluster configuration using snctl
:
-
Ensure you have the latest version of
snctl
installed and configured. -
Update the PulsarCluster CRD file (e.g.,
<cluster-name>.yaml
) with the desired configuration options. -
Apply the updated PulsarCluster CRD file to the cluster:
To view the cluster configuration, you can use the following command:
To update the cluster configuration using the StreamNative Terraform Provider:
-
Ensure you have the StreamNative Terraform Provider configured in your environment.
-
Use the
streamnative_pulsar_cluster
resource to define or update your cluster configuration. -
Specify the desired configuration options within the
config
block.
Here’s an example of how to update the cluster configuration using Terraform:
To apply the changes, run the following command:
To view the cluster configuration, you can use the following command:
For more details, please refer to the StreamNative Terraform Provider documentation. See a complete example in the StreamNative Terraform Provider GitHub repository.
Please note that not all configuration options are modifiable. Some settings are determined by the release channel you selected during the cluster provision process and cannot be changed. Updating the cluster configuration will cause the cluster to roll restart all the brokers. Please make sure to update the cluster configuration during off-peak hours to avoid any disruptions to your service.