Open weideng1 opened 1 year ago
We could potentially add another config setting like "ZDM_PROXY_TOPOLOGY_LOCAL_ADDRESS" and then let the proxy compute its index by looking up the ZDM_PROXY_TOPOLOGY_LOCAL_ADDRESS
in the ZDM_PROXY_TOPOLOGY_ADDRESSES
. We would require only one of these 2 settings to be set (îndex or local address) but in order for the local address setting to work correctly we need the proxy to order the ZDM_PROXY_TOPOLOGY_ADDRESSES
first just to ensure that it works even when the order of the addresses in ZDM_PROXY_TOPOLOGY_ADDRESSES
is different in different proxy nodes (it should never happen but we should be safe).
Would this make it easier to make the proxy work with stateful sets @weideng1 ?
Currently zdm-proxy process expects this env value to be set at start time:
ZDM_PROXY_TOPOLOGY_INDEX
I've looked into online discussions, and looks like there is an unresolved issue w.r.t. directly exposing this ordinal index from statefulsets: https://github.com/kubernetes/kubernetes/issues/40651
Before this is fully supported in a future version of k8s, we will have to adopt some ugly workaround by either using initContainers or lifecycle hook like the following:
┆Issue is synchronized with this Jira Task by Unito ┆Components: Proxy ┆Issue Number: ZDM-505