update kafka output policy only on eligible grid types

Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
reyesj2
2024-06-18 12:09:59 -04:00
parent 5f6a9850eb
commit 911d6dcce1
2 changed files with 19 additions and 10 deletions

View File

@@ -477,14 +477,8 @@ post_to_2.4.70() {
}
post_to_2.4.80() {
echo -e "\nUpdating Elastic Fleet output policy\n"
so-kafka-fleet-output-policy > /dev/null
output=$(curl -sK /opt/so/conf/elasticsearch/curl.config -L "http://localhost:5601/api/fleet/outputs" | jq -r .items[].id)
if ! echo "$output" | grep -q "so-manager_kafka"; then
fail "Couldn't update Elastic Fleet output policy so-manager_kafka"
else
echo -e "\nSuccessfully updated Elastic Fleet output policy"
fi
echo -e "\nChecking if update to Elastic Fleet output policy is required\n"
so-kafka-fleet-output-policy
POSTVERSION=2.4.80
}