Enable the multiaddreses.Enabled JVM flag in the zkserver.sh
parse inputted extra addresses and add them to the zoo config
(2-3 concise points about the changes in this PR. When committing this PR, the committer is expected to copy the content of this section to the merge description box)
Purpose of the change
In zookeeper > 3.6.0 you can specify multiple addresses for a singular zookeeper server. here is the description of that cluster option. This update allows you to leverage that feature through the operator. This can also be useful if you want to expose individual zk servers through external addresses.
(e.g., Fixes #666, Closes #1234)
What the code does
Add funcitionality to parse a list of zk server addresses in additionalConfig when creating the config map
in the zookeeper image, parse those additional addresses and properly use them in the zk config
The operator currently writes server addresses on write config and node registration. When one of these events happen we add an extra step that:
parses the new addServerAddresses.txt created by the config map for addresses listed for the current server ID
if there is a "|" it formats each address using the zkconfig function, otherwise it adds the singular address
it also removes the client port that is appended by the zkconfig function for all addresses except the final one in the list. This is to follow formatting for the multiAddress feature as the client port should only be present once per list of servers
(Detailed description of the code changes)
How to verify it
add the -Dzookeeper.multiAddress.enabled=true flag to the value of the SERVER_JVMFLAGS env variable in your pod definition.
Change log description
Purpose of the change
In zookeeper > 3.6.0 you can specify multiple addresses for a singular zookeeper server. here is the description of that cluster option. This update allows you to leverage that feature through the operator. This can also be useful if you want to expose individual zk servers through external addresses. (e.g., Fixes #666, Closes #1234)
What the code does
(Detailed description of the code changes)
How to verify it
-Dzookeeper.multiAddress.enabled=true
flag to the value of theSERVER_JVMFLAGS
env variable in your pod definition.Then add your additional addresses to the
config
definition of yourZookeeperCluster
CRD in the formatserver.<id>: <address1>|<address2>|...
Validate correct address list is displayed through k8s portforwarding