K8splugin served with docker-compose doesn't utilize
ovn-central-address configured in host environment.
Function responsible for generating config file has been
modified to provide this information if available.
Issue-ID: MULTICLOUD-708
Signed-off-by: Konrad Bańka <k.banka@samsung.com>
Change-Id: Ie3c27c68c02a0e206f6447e8c4330e18af942cd8
 }
 
 function generate_k8sconfig {
+    local ovn_address
+    if [ -n "${OVN_CENTRAL_ADDRESS:-}" ]; then
+        ovn_address="\"ovn-central-address\": \"${OVN_CENTRAL_ADDRESS}\","
+    fi
 cat << EOF > k8sconfig.json
 {
-    "database-address":     "${DATABASE_IP}",
+    "database-address": "${DATABASE_IP}",
     "database-type": "mongo",
     "plugin-dir": "plugins",
+    ${ovn_address}
     "service-port": "9015"
 }
 EOF