Willy, Am 16.02.21 um 11:28 schrieb Willy Tarreau: > - defined(name) : true if this environment variable is set
This one is fine for me. But I believe would be redundant with `streq($name,"")`. > - keyword(name) : true if this config keyword is registered > - service(name) : true if this service is registered > - action(name) : true if this action is registered > - option(name) : true if this proxy option exists I don't think these are a good idea. They are overly specific and pretty much redundant with a version comparison. I would assume that one only shoots their foot with those (e.g. with typos and inconsistent behavior). You should know what you are running in production and then you can switch based on versions. Generally: Either a specific configuration line is important or it is not (then it should be commented or deleted). > - configured(name): true if this feature was configured at build time > - supported(name): true if this feature is supported at run time I'm not sure about these. They sit between a version comparison (which I think is good) and the super granular feature detection (which I think is not good). There should be less risk in enabling a feature flag vs. upgrading to a new HAProxy version. Thus I expect a more homogeneous LB fleet with regard to feature flags, making these less important to have. It's hard to me to think of a situation where it would make sense to e.g. run Lua only on half of the LBs. > - version_atleast(): true if the haproxy version is at least this one > - version_before(): the opposite of the above: I think this is a must have and it's the one I planned to implement. In fact I wished to have this in the past. It would allow for a seamless upgrades of HAProxy where half of the cluster runs some older and the other half runs some newer version. In my specific case I would have used it when `http-error` was newly introduced to already add the unique ID to the error pages on the HAProxy 2.2 machines, while leaving it out for the older ones. Similarly it would have allowed me to already remove the Lua script I was running in favor of `http-request return`. > - streq(a,b): compare two strings (should be careful, maybe it would > be better to rethink about this for expressions later): I think this one is useful for the examples you gave. Best regards Tim Düsterhus