From 628893fd5b85da670d7fd4860c00dfe93ae208b5 Mon Sep 17 00:00:00 2001 From: reyesj2 <94730068+reyesj2@users.noreply.github.com> Date: Tue, 11 Jun 2024 11:56:21 -0400 Subject: [PATCH] remove redundant 'kafka_' from annotations & defaults Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com> --- salt/kafka/defaults.yaml | 6 +++--- salt/kafka/soc_kafka.yaml | 13 +++++++------ salt/manager/tools/sbin/soup | 2 +- salt/salt/files/engines.conf | 6 +++--- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/salt/kafka/defaults.yaml b/salt/kafka/defaults.yaml index e029bc251..062c2d5ca 100644 --- a/salt/kafka/defaults.yaml +++ b/salt/kafka/defaults.yaml @@ -1,9 +1,9 @@ kafka: enabled: False cluster_id: - kafka_pass: - kafka_controllers: - reset_kafka: + password: + controllers: + reset: config: broker: advertised_x_listeners: diff --git a/salt/kafka/soc_kafka.yaml b/salt/kafka/soc_kafka.yaml index 686b2ad97..59816cef3 100644 --- a/salt/kafka/soc_kafka.yaml +++ b/salt/kafka/soc_kafka.yaml @@ -1,6 +1,6 @@ kafka: enabled: - description: Enable or disable Kafka. Recommended to have desired configuration staged prior to enabling Kafka. Configure kafka_controllers with the hostnames of the nodes you want to act as controllers, join all receiver nodes to grid that will be converted to Kafka nodes, and configure the default_replication_factor to the desired value for your redundancy needs. + description: Enable or disable Kafka. Recommended to have desired configuration staged prior to enabling Kafka. Configure controllers with the hostnames of the nodes you want to act as controllers, join all receiver nodes to grid that will be converted to Kafka nodes, and configure the default_replication_factor to the desired value for your redundancy needs. helpLink: kafka.html cluster_id: description: The ID of the Kafka cluster. @@ -8,16 +8,17 @@ kafka: advanced: True sensitive: True helpLink: kafka.html - kafka_pass: + password: description: The password to use for the Kafka certificates. sensitive: True helpLink: kafka.html - kafka_controllers: + controllers: description: A comma-seperated list of Security Onion hosts that will act as Kafka controllers. These hosts will be responsible for managing the Kafka cluster. WARNING - The hostnames of receiver nodes intended to be controllers should be added here BEFORE they have joined the Security Onion grid or BEFORE enabling KAFKA. This is to ensure that data is not lost by converting a data broker to a controller. Failure to do so may result in topics becoming unavailable and requiring manual intervention to repair or resetting Kafka data. forcedType: "string" helpLink: kafka.html - reset_kafka: - description: Disable and reset the Kafka cluster. This will remove all Kafka data including logs that may have not yet been ingested into Elasticsearch and reverts the grid to using REDIS as the global pipeline. This is useful when testing different Kafka configurations such as rearranging Kafka brokers / controllers allowing you to reset the cluster rather than manually fixing any issues arising from attempting to reassign a Kafka broker into a controller. Enter 'YES_RESET_KAFKA' and submit to disable and reset Kafka. Make any configuration changes required and re-enable Kafka when ready. + reset: + description: Disable and reset the Kafka cluster. This will remove all Kafka data including logs that may have not yet been ingested into Elasticsearch and reverts the grid to using REDIS as the global pipeline. This is useful when testing different Kafka configurations such as rearranging Kafka brokers / controllers allowing you to reset the cluster rather than manually fixing any issues arising from attempting to reassign a Kafka broker into a controller. Enter 'YES_reset' and submit to disable and reset Kafka. Make any configuration changes required and re-enable Kafka when ready. This action CANNOT be reversed. + advanced: True helpLink: kafka.html config: broker: @@ -31,7 +32,7 @@ kafka: forcedType: bool helpLink: kafka.html default_x_replication_x_factor: - description: The default replication factor for automatically created topics. This value must be less than the amount of brokers in the cluster. Hosts specified in kafka_controllers should not be counted towards total broker count. + description: The default replication factor for automatically created topics. This value must be less than the amount of brokers in the cluster. Hosts specified in controllers should not be counted towards total broker count. title: default.replication.factor forcedType: int helpLink: kafka.html diff --git a/salt/manager/tools/sbin/soup b/salt/manager/tools/sbin/soup index 56d2d7de3..e38ba40e0 100755 --- a/salt/manager/tools/sbin/soup +++ b/salt/manager/tools/sbin/soup @@ -644,7 +644,7 @@ up_to_2.4.80() { kafka_cluster_id=$(get_random_value 22) echo ' cluster_id: '$kafka_cluster_id >> /opt/so/saltstack/local/pillar/kafka/soc_kafka.sls kafkapass=$(get_random_value) - echo ' kafka_pass: '$kafkapass >> /opt/so/saltstack/local/pillar/kafka/soc_kafka.sls + echo ' password: '$kafkapass >> /opt/so/saltstack/local/pillar/kafka/soc_kafka.sls INSTALLEDVERSION=2.4.80 } diff --git a/salt/salt/files/engines.conf b/salt/salt/files/engines.conf index dbfb89973..7b1f9bf3e 100644 --- a/salt/salt/files/engines.conf +++ b/salt/salt/files/engines.conf @@ -60,7 +60,7 @@ engines: - files: - /opt/so/saltstack/local/pillar/kafka/soc_kafka.sls - /opt/so/saltstack/local/pillar/kafka/adv_kafka.sls - pillar: kafka.kafka_controllers + pillar: kafka.controllers default: '' actions: from: @@ -78,7 +78,7 @@ engines: - files: - /opt/so/saltstack/local/pillar/kafka/soc_kafka.sls - /opt/so/saltstack/local/pillar/kafka/adv_kafka.sls - pillar: kafka.reset_kafka + pillar: kafka.reset default: '' actions: from: @@ -90,5 +90,5 @@ engines: - cmd.run: cmd: salt -C 'G@role:so-standalone or G@role:so-manager or G@role:so-managersearch or G@role:so-receiver' state.apply kafka.disabled,kafka.reset_kafka - cmd.run: - cmd: /usr/sbin/so-yaml.py remove /opt/so/saltstack/local/pillar/kafka/soc_kafka.sls kafka.reset_kafka + cmd: /usr/sbin/so-yaml.py remove /opt/so/saltstack/local/pillar/kafka/soc_kafka.sls kafka.reset interval: 10