Skip to content

Commit

Permalink
Add support for parameter secureClientPort (deric#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoppe authored Jul 23, 2020
1 parent 1a8abbf commit bc08d41
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
String $cleanup_sh = $zookeeper::params::cleanup_sh,
Optional[String] $client_ip = $zookeeper::params::client_ip,
Integer $client_port = $zookeeper::params::client_port,
Optional[Integer] $secure_client_port = $zookeeper::params::secure_client_port,
String $datastore = $zookeeper::params::datastore,
Optional[String] $datalogstore = $zookeeper::params::datalogstore,
Integer $election_port = $zookeeper::params::election_port,
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
$cleanup_sh = '/usr/share/zookeeper/bin/zkCleanup.sh'
$client_ip = undef # use e.g. $::ipaddress if you want to bind to single interface
$client_port = 2181
$secure_client_port = undef
$datastore = '/var/lib/zookeeper'
# datalogstore used to put transaction logs in separate location than snapshots
$datalogstore = undef
Expand Down
9 changes: 8 additions & 1 deletion templates/conf/zoo.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ clientPortAddress=<%= scope.lookupvar("zookeeper::client_ip") %>
#clientPortAddress=
<% end -%>

# Supported since 3.5.1
<% if ! [nil, :undefined, :undef].include?(scope.lookupvar("zookeeper::secure_client_port")) -%>
secureClientPort=<%= scope.lookupvar("zookeeper::secure_client_port") %>
<% else -%>
#secureClientPort=2281
<% end -%>

# specify all zookeeper servers
# The first port is used by followers to connect to the leader
# The second one is used for leader election
Expand Down Expand Up @@ -134,4 +141,4 @@ kerberos.removeRealmFromPrincipal=true
<% unless scope.lookupvar("zookeeper::whitelist_4lw").empty? -%>
# Supported since 3.4.10
4lw.commands.whitelist=<%= scope.lookupvar("zookeeper::whitelist_4lw").join(',') %>
<% end -%>
<% end -%>

0 comments on commit bc08d41

Please sign in to comment.