FEATURE: Add range iterator item variable for server-template and zero-padding converter

2019-03-29 Thread Matous Jan Fialka

Hello,

please consider adding range iterator item variable (say 
`rng.iteritem`) for
the `server-template` directive so that it can be expanded in the 
`:`
part of the statement or anywhere else where applicable (see in the 
example snippet

below).

Also to have general zero-padding converter (say `zeropad()`) to 
pad values
with zeroes would be splendid for use with `server-template` or 
elsewhere (therefor

I aggregated both things into single feature request).

-snip-

zeropad()
  Performs a zero-padding of preceding expression to the given 
.


  Example:
server-template s 3 
"svc-%[rng.iteritem,zeropad(3)].domain.tld:80" check


# would be equivalent to:
server s1 svc-001.domain.tld:80 check
server s2 svc-002.domain.tld:80 check
server s3 svc-003.domain.tld:80 check

-snip-

I am not sure how hard it would be to implemented it but it could be 
very helpful
in case you use many backend servers with consistent sequential naming 
as shown in

the example snippet.

Many thanks for providing us wich such an excellent piece of software 
which *HAProxy*

truly is!

Sincerely,

--
mjf



[DOC] Clarification of the "abbreviated form with all-0-octets omitted" for IPv4 addresses needed

2019-03-11 Thread Matous Jan Fialka

Hello,

my collegues and me were highly surprised with the "abbreviated form 
with all-0-octets
ommitted" [1] for IPv4 addresses.  It would be good to provide better 
(or rather exact)
technical explanation why it is so - either in the documentation or at 
least here in the
mailing-list.  Any sort of clarification would be highly appreciated 
for this is *very*
uncommon and we think it is worth the effort to provide some.  We can 
easily live with

it but would like to know the exact reason why it is so...  Thank you.

[1]: http://cbonte.github.io/haproxy-dconv/1.9/configuration.html#7.1.6

Sincerely,

--
mjf