Skip to content

Commit

Permalink
Updated broker scripts from PubSubPlus Helm v3.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bczoma committed Aug 22, 2023
1 parent 58f2ac9 commit d13f211
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 167 deletions.
4 changes: 2 additions & 2 deletions controllers/brokerscripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ if [ "${BROKER_TLS_ENABLED}" = "true" ]; then
cat /mnt/disks/certs/server/${BROKER_CERT_FILENAME} /mnt/disks/certs/server/${BROKER_CERTKEY_FILENAME} > /dev/shm/server.cert
export tls_servercertificate_filepath="/dev/shm/server.cert"
fi
# Deal with the fact we cannot accept "-" in router names
export routername=$(echo $(hostname) | sed 's/-//g')
if [ "${BROKER_REDUNDANCY}" = "true" ]; then
IFS='-' read -ra host_array <<< $(hostname)
is_monitor=$([ ${host_array[-2]} = "m" ] && echo 1 || echo 0)
is_backup=$([ ${host_array[-2]} = "b" ] && echo 1 || echo 0)
namespace=$(echo $STATEFULSET_NAMESPACE)
service=${BROKERSERVICES_NAME}
# Deal with the fact we cannot accept "-" in broker names
service_name=$(echo ${service} | sed 's/-//g')
export routername=$(echo $(hostname) | sed 's/-//g')
export redundancy_enable=yes
export configsync_enable=yes
export redundancy_authentication_presharedkey_key=$(cat /mnt/disks/secrets/presharedauthkey/preshared_auth_key | base64)
Expand Down
Loading

0 comments on commit d13f211

Please sign in to comment.