Hi.
Am 29.03.2019 um 09:34 schrieb 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).
Please can you open a issue for that Feature Request, thanks.
https://github.com/haproxy/haproxy/issues
Regards
Aleks
> -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,
>