Description
Hello,
I'm currently using HAProxy version 3.0.9 along with dataplaneapi version 3.1.5.
To preserve environment variables in external-check mode, I've added the preserve-env keyword as documented here. However, I've observed that any configuration change to haproxy.cfg — whether made manually or through dataplaneapi — results in the preserve-env keyword being removed.
Interestingly, even after it’s removed, the environment variables remain accessible in the check script until HAProxy is restarted. After a restart, the check script can no longer access those environment variables.
A similar issue occurs when using named defaults for a frontend or backend with the from keyword as described here. When any dataplaneapi operation is performed on such frontends, the from keyword is stripped from the configuration.
Please let me know if this is expected behavior or if there's a workaround to preserve these directives through dataplaneapi operations.
Thanks