Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to kafkanode #12792

Merged
merged 9 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run kafka-clusterid script when pillar values are missing
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
  • Loading branch information
reyesj2 committed Apr 11, 2024
commit ca7253a5896f2a028021339a04dccd9eabb3b863
8 changes: 5 additions & 3 deletions salt/manager/tools/sbin/so-kafka-clusterid
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ fi
if ! grep -q "^ kafka_cluster_id:" $local_salt_dir/pillar/secrets.sls; then
kafka_cluster_id=$(get_random_value 22)
echo ' kafka_cluster_id: '$kafka_cluster_id >> $local_salt_dir/pillar/secrets.sls
else
echo 'kafka_cluster_id exists'
salt-call pillar.get secrets
fi

if ! grep -q "^ kafkapass:" $local_salt_dir/pillar/secrets.sls; then
kafkapass=$(get_random_value)
echo ' kafkapass: '$kafkapass >> $local_salt_dir/pillar/secrets.sls
fi
4 changes: 3 additions & 1 deletion setup/so-functions
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,7 @@ generate_passwords(){
SOCSRVKEY=$(get_random_value 64)
IMPORTPASS=$(get_random_value)
KAFKACLUSTERID=$(get_random_value 22)
KAFKAPASS=$(get_random_value)
}

generate_interface_vars() {
Expand Down Expand Up @@ -1947,7 +1948,8 @@ secrets_pillar(){
"secrets:"\
" import_pass: $IMPORTPASS"\
" influx_pass: $INFLUXPASS"\
" kafka_cluster_id: $KAFKACLUSTERID" > $local_salt_dir/pillar/secrets.sls
" kafka_cluster_id: $KAFKACLUSTERID"\
" kafka_pass: $KAFKAPASS" > $local_salt_dir/pillar/secrets.sls
fi
}

Expand Down