Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Added "Services" env var for explicit declaration #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jascen
Copy link

@Jascen Jascen commented Oct 20, 2017

Note: I don't really know Python. I hacked my way around, so I apologize if anything just looks plain dumb.

  • You can now indicate your Service(s) to be load balanced ("SERVICES" Environment Variable on HAProxy)
  • Note: Services env var only only apply to services within the same project/namespace.
  • Format is: "ServiceName:Port,Port;ServiceName"...
    • Ex: SERVICES=nginxapp1:443,8080;nginxapp2:80,nginxapp3
  • If any services are specified, HAProxy will only pay attention to the defined services in this variable. 
    • Compose: must Link the service to the HAProxy
  • If any ports are specified, they will be the only ports used for that service.  
    • Note: If no ports are specified:
      • Swarm: it will check the Service for the Env Var "SERVICE_PORTS" (original behavior)
      • Compose: it will add all exposed ports (original behavior)
  • If a specified service is not on the same network as HAProxy, it will be ignored (original behavior)

Note: I don't really know Python.  I hacked my way around, so I apologize if anything just looks plain dumb.
- You can now indicate your Service(s) to be load balanced ("SERVICES" Environment Variable on HAProxy)
- Note: Services env var only only apply to services within the same project/namespace.
- Format is: <ServiceName>:<Port>,<Port>;<ServiceName>...
  - Ex: SERVICES=nginxapp1:443,8080;nginxapp2:80,nginxapp3
- If any services are specified, HAProxy will only pay attention to the defined services in this variable. 
  - Compose: must Link the service to the HAProxy
- If any ports are specified, they will be the only ports used for that service.  
  - Note: If no ports are specified:
    - Swarm: it will check the Service for the Env Var "SERVICE_PORTS" (original behavior)
    - Compose: it will add all exposed ports (original behavior)
- If a specified service is not on the same network as HAProxy, it will be ignored (original behavior)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant