Hello, On Fri, Jun 11, 2021 at 11:38:38AM +0530, reshma r wrote: > Hello all, > I Had a follow up query, sorry if it is an obvious question. once I > implement the socket call as a sidecar process, say as a lua script that > reads the new configuration from portal into a variable, how would I then > update this variable within haproxy to be used by lua script loaded using > lua_load directive? I understand we can do it using stats socket via CLI > and socat but is there a way to do it from within lua script (the one > running as sidecar process) itself so that I check and update portal config > variable every 5 min automatically?
There are various ways. Your Lua script could periodically connect outside to retrieve some data and set local variables for example. If you'd prefer to control this from outside you could also write an HTTP service in Lua that receives a certain URL after appropriate controls and extracts info from query string, payload or headers, and sets variables as well. I don't have much example to point you to, though. Hoping this helps, Willy

