Describe the bug
Currently EDGE service would try to enable ingress proxy configs for the following services: cp-api-srv, cp-git, cp-idp, cp-docker-registry, cp-share-srv
But some of these services are optional, f.e. cp-share-srv.
In case if we didn't deploy these optional services edge will fail, because nginx will not be able to start due to luck of the certificates for the services that are missing.
Solution
Based on #3436 we can refactor this behaviour to make it conditional.
Rename all proxy configs with regards to exact service name and add .tmpl at the end. F.e.: cp-auth.conf -> cp-idp.conf.tmpl
During edge init process, enable only those nginx proxy configs, which services were deployed
if name of the service in CP_SERVICES_ENABLED - enable proxy config, otherwise skip it
if all is the value of CP_SERVICES_ENABLED enable all proxy configs
Write content of the resolved (when all env var are substituted within its values) template file to the file with name <service-name>.conf e.g. cp-idp.conf
Describe the bug Currently EDGE service would try to enable ingress proxy configs for the following services:
cp-api-srv
,cp-git
,cp-idp
,cp-docker-registry
,cp-share-srv
But some of these services are optional, f.e.
cp-share-srv
. In case if we didn't deploy these optional services edge will fail, because nginx will not be able to start due to luck of the certificates for the services that are missing.Solution Based on #3436 we can refactor this behaviour to make it conditional.
.tmpl
at the end. F.e.:cp-auth.conf
->cp-idp.conf.tmpl
CP_SERVICES_ENABLED
- enable proxy config, otherwise skip itall
is the value ofCP_SERVICES_ENABLED
enable all proxy configs<service-name>.conf
e.g.cp-idp.conf