Skip to content

Commit

Permalink
Merge pull request rancher#717 from rawmind0/master
Browse files Browse the repository at this point in the history
Feat: Updated traefik external rancher integration
  • Loading branch information
rawmind0 authored Jan 9, 2018
2 parents 1f50ad5 + 289896b commit 23032ab
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 16 deletions.
30 changes: 23 additions & 7 deletions templates/traefik/15/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,31 @@ Api integration needs you create an environment API key in your rancher environm

Use this labels if you choose extenal rancher integration.

- traefik.enable = <true | false>
- traefik.enable = < true | stack | false > #Controls if you want to publish or not the service
- true: the service will be published as *service_name.stack_name.traefik_domain*
- stack: the service will be published as *stack_name.traefik_domain*. WARNING: You could have collisions inside services within your stack
- stack: the service will be published as *stack_name.domain*. WARNING: You can have collisions inside services within your stack
- false: the service will not be published
- traefik.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". WARNING: You could have collisions BE CAREFULL
- traefik.domain = < domain > # Domain names to route rule. Multiple values separated by ","
- traefik.path = < path > # Path to route rule. Multiple paths separated by ","
- traefik.port = < port > # Port to expose throught traefik
- traefik.acme = < true | false > # Enable/disable ACME traefik feature
- traefik.priority = <priority> # Override for frontend priority. Default `5`
- traefik.protocol = < http | https > # Override the default protocol `http`
- traefik.sticky = < true | false > # Enable/disable sticky sessions to the backend. Default `false`
- traefik.backend.loadbalancer.method = < drr | wrr > # Override default lb algorithm `drr`
- traefik.backend.circuitbreaker.expression = < expression > # Override default backend circuitbreaker expression `NetworkErrorRatio() > 0.5`
- traefik.frontend.passHostHeader = < true | false > # Forward client Host header to the backend. Default `true`
- traefik.weight = < weight > # Override default backend weight `5`
- traefik.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". traefik.domain is appended. WARNING: You could have collisions BE CAREFULL
- traefik.alias.fqdn = < alias fqdn > # Alternate names to route rule. Multiple values separated by ",". traefik.domain must be defined but is not appended here.
- traefik.domain = < domain.name > # Domain names to route rules. Multiple domains separated by ","
- traefik.domain.regexp = < domain.regexp > # Domain name regexp rule. Multiple domains separated by ","
- traefik.port = <port> # port to expose throught traefik. Default `80`
- traefik.acme = < true | false > # Enable/disable ACME traefik feature. Default `false`
- traefik.path = < path > # Path rule. Multiple values separated by ","
- traefik.path.strip = < path > # Path strip rule. Multiple values separated by ","
- traefik.path.prefix = < path > # Path prefix rule. Multiple values separated by ","
- traefik.path.prefix.strip = < path > # Path prefix strip rule. Multiple values separated by ","

WARNING: Only services with healthy state are added to traefik, so health checks are mandatory.

More info [rancher-traefik](https://github.com/rawmind0/rancher-traefik)

### Usage:

Expand Down
2 changes: 1 addition & 1 deletion templates/traefik/15/docker-compose.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ services:
io.rancher.scheduler.affinity:host_label: ${host_label}
io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
io.rancher.container.start_once: 'true'
image: rawmind/rancher-traefik:1.4.4-4
image: rawmind/rancher-traefik:1.4.4-6
network_mode: none
volumes:
- tools-volume:/opt/tools
Expand Down
30 changes: 23 additions & 7 deletions templates/traefik/16/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,31 @@ Api integration needs you create an environment API key in your rancher environm

Use this labels if you choose extenal rancher integration.

- traefik.enable = <true | false>
- traefik.enable = < true | stack | false > #Controls if you want to publish or not the service
- true: the service will be published as *service_name.stack_name.traefik_domain*
- stack: the service will be published as *stack_name.traefik_domain*. WARNING: You could have collisions inside services within your stack
- stack: the service will be published as *stack_name.domain*. WARNING: You can have collisions inside services within your stack
- false: the service will not be published
- traefik.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". WARNING: You could have collisions BE CAREFULL
- traefik.domain = < domain > # Domain names to route rule. Multiple values separated by ","
- traefik.path = < path > # Path to route rule. Multiple paths separated by ","
- traefik.port = < port > # Port to expose throught traefik
- traefik.acme = < true | false > # Enable/disable ACME traefik feature
- traefik.priority = <priority> # Override for frontend priority. Default `5`
- traefik.protocol = < http | https > # Override the default protocol `http`
- traefik.sticky = < true | false > # Enable/disable sticky sessions to the backend. Default `false`
- traefik.backend.loadbalancer.method = < drr | wrr > # Override default lb algorithm `drr`
- traefik.backend.circuitbreaker.expression = < expression > # Override default backend circuitbreaker expression `NetworkErrorRatio() > 0.5`
- traefik.frontend.passHostHeader = < true | false > # Forward client Host header to the backend. Default `true`
- traefik.weight = < weight > # Override default backend weight `5`
- traefik.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". traefik.domain is appended. WARNING: You could have collisions BE CAREFULL
- traefik.alias.fqdn = < alias fqdn > # Alternate names to route rule. Multiple values separated by ",". traefik.domain must be defined but is not appended here.
- traefik.domain = < domain.name > # Domain names to route rules. Multiple domains separated by ","
- traefik.domain.regexp = < domain.regexp > # Domain name regexp rule. Multiple domains separated by ","
- traefik.port = <port> # port to expose throught traefik. Default `80`
- traefik.acme = < true | false > # Enable/disable ACME traefik feature. Default `false`
- traefik.path = < path > # Path rule. Multiple values separated by ","
- traefik.path.strip = < path > # Path strip rule. Multiple values separated by ","
- traefik.path.prefix = < path > # Path prefix rule. Multiple values separated by ","
- traefik.path.prefix.strip = < path > # Path prefix strip rule. Multiple values separated by ","

WARNING: Only services with healthy state are added to traefik, so health checks are mandatory.

More info [rancher-traefik](https://github.com/rawmind0/rancher-traefik)

### Usage:

Expand Down
2 changes: 1 addition & 1 deletion templates/traefik/16/docker-compose.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ services:
io.rancher.scheduler.affinity:host_label: ${host_label}
io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
io.rancher.container.start_once: 'true'
image: rawmind/rancher-traefik:1.4.4-4
image: rawmind/rancher-traefik:1.4.4-6
network_mode: none
volumes:
- tools-volume:/opt/tools
Expand Down

0 comments on commit 23032ab

Please sign in to comment.