docker-flow / docker-flow-proxy

Docker Flow Proxy
https://docker-flow.github.io/docker-flow-proxy/
MIT License
317 stars 189 forks source link

Custom backend template breaks frontend. #87

Closed dimovnike closed 2 years ago

dimovnike commented 5 years ago

Description

Default frontend is not populated with conditions when using custom backend template. A minimal frontend is created instead:

Steps to reproduce the issue:

  1. Create a minimal backend template and set it up in - com.df.templateBePath setting
  2. Deploy the service using that template
  3. Restart proxy service.

Describe the results you received:

I get backends created OK (i.e. the backend template works) but the conditions in frontend are missing. A minimal frontend is created instead:

frontend services
    bind *:80
    bind *:443
    mode http
    option  forwardfor

Describe the results you expected:

I expect the frontend to work just as with normal backend.

Additional information you deem important (e.g. issue happens only occasionally):

if the service is deployed without custom template, then template label is added and service updated - it will work as expected (until the proxy is restarted).

Also I find this code suspect in reconfigure.go line 101:

if !m.hasTemplate() {
    proxy.Instance.AddService(m.Service)
}

Additional environment details (AWS, VirtualBox, physical, etc.):

Tested using the provided docker container.

dimovnike commented 5 years ago

Removing the condition in the mentioned code seems to fix the issue.

vfarcic commented 5 years ago

This project needs adoption. I moved to Kubernetes and cannot dedicate time to this project anymore. Similarly, involvement from other contributors dropped as well. Please consider contributing yourself if you think this project is useful.

lle0x commented 2 years ago

Dear @dimovnike

If this issue is still relevant, please feel free to leave a comment here.

dimovnike commented 2 years ago

Hello, not relevent anymore because I switched to kubernetes.

lle0x commented 2 years ago

Thank you @dimovnike .