Commit graph

205 commits

Author SHA1 Message Date
Fernandez Ludovic
6e5f7650a5 refactor(docker): template readability. 2017-12-20 15:20:07 +01:00
Ludovic Fernandez
cd1b3904da Add missing entrypoints template. 2017-12-20 10:26:03 +01:00
lishaoxiong
3142a4f4b3 Fix stickiness bug due to template syntax error 2017-12-19 14:08:03 +01:00
Fernandez Ludovic
f6520727a3 Merge branch 'v1.5' into master 2017-12-15 22:16:48 +01:00
Ludovic Fernandez
7ecd6d20ba Support regex redirect by frontend 2017-12-15 11:48:03 +01:00
Tiscs Sun
c66d9de759 Custom headers by service labels for docker backends 2017-12-06 22:26:03 +01:00
Fernandez Ludovic
c705d6f9b3 refactor(ecs): rewrite configuration system. 2017-12-05 19:40:04 +01:00
Fernandez Ludovic
cee022b935 refactor(marathon): rewrite configuration system. 2017-12-05 19:40:04 +01:00
Daniel Tomcej
313357a6b3 quote template strings 2017-11-30 10:42:02 +01:00
Daniel Tomcej
4cb6241e93 Kubernetes security header annotations 2017-11-28 13:36:03 +01:00
lishaoxiong
1feeeb2eec Manage certificates dynamically in kv store 2017-11-23 11:50:03 +01:00
Daniel Tomcej
7063da1c7d Add docker security headers via labels 2017-11-22 19:40:04 +01:00
Tait Clarridge
6d2f4a0813 Add health check label to ECS 2017-11-21 11:06:03 +01:00
Manuel Zapf
5d6384e101 redirect to another entryPoint per frontend 2017-11-18 13:50:03 +01:00
Fernandez Ludovic
2070aa9443 Merge 'v1.4.2' into master 2017-11-03 13:51:24 +01:00
Alex Antonov
02035d4942 Missing Backend key in configuration when application has no tasks 2017-11-01 11:26:03 +01:00
Fernandez Ludovic
a0c72cdf00 Merge v1.4.1 into master 2017-10-25 11:36:14 +02:00
NicoMen
f0371da838 Add unique ID to Docker services replicas 2017-10-25 10:00:03 +02:00
Daniel Tomcej
d973096464 Add Custom header parsing to Docker Provider 2017-10-20 17:14:03 +02:00
Fernandez Ludovic
7192aa86b5 Merge 'v1.4.0' into master 2017-10-16 23:10:44 +02:00
Ludovic Fernandez
08503655d9 Backward compatibility for sticky 2017-10-16 17:38:03 +02:00
Ludovic Fernandez
8cb3f0835a Stickiness cookie name. 2017-10-12 17:50:03 +02:00
Fernandez Ludovic
9faae7387e Merge tag 'v1.4.0-rc5' into master 2017-10-10 17:17:44 +02:00
Ludovic Fernandez
a9d4b09bdb Stickiness cookie name 2017-10-10 11:10:02 +02:00
Fernandez Ludovic
9fba37b409 Merge v1.4.0-rc2 into master 2017-09-09 01:00:48 +02:00
Michael
c19cce69fa Add basic auth for ecs 2017-09-07 17:34:03 +02:00
Michael
b705e64a8a Add Basic auth for consul catalog 2017-09-07 15:28:02 +02:00
Michael
9ce4f94818 ECS provider refactoring 2017-09-06 12:10:05 +02:00
Michael
f16219f90a Exposed by default feature in Consul Catalog 2017-08-25 17:32:03 +02:00
Michael
086a85d2f0 Enable loadbalancer.sticky for ECS 2017-08-25 11:42:03 +02:00
Nicolas Bonneval
8105f1c379 Enable loadbalancer.sticky for Consul Catalog 2017-08-24 18:38:05 +02:00
Alex Antonov
ec3e2c08b8 Support multi-port service routing for containers running on Marathon 2017-08-21 10:46:03 +02:00
Timo Reimann
779eeba650 [marathon] Use single API call to fetch Marathon resources.
Change Marathon provider to make just one API call instead of two per
configuration update by means of specifying embedded resources, which
enable retrieving multiple response types from the API at once. Apart
from the obvious savings in API calls, we primarily gain a consistent
view on both applications and tasks that allows us to drop a lot of
correlation logic.  Additionally, it will serve as the basis for the
introduction of readiness checks which require application/task
consistency for correct leverage on the proxy end.

Additional changes:

marathon.go:
- Filter on tasks now embedded inside the applications.
- Reduce/simplify signature on multiple template functions as we do not
  need to check for proper application/task correlation anymore.
- Remove getFrontendBackend in favor of just getBackend.
- Move filtering on enabled/exposed applications from `taskFilter` to
  `applicationFilter`. (The task filter just reached out to the
  applications anyway, so it never made sense to locate it with the
  tasks where the filter was called once for every task even though the
  result would never change.)
- Remove duplicate constraints filter in tasks, where it neither made
  sense to keep as it operates on the application level only.
- Add context to rendering error.

marathon_test.go:
- Simplify and reduce numerous tests.
- Convert tests with high number of cases into parallelized sub-tests.
- Improve readability/structure for several tests.
- Add missing test for enabled/exposed applications.
- Simplify the mocked Marathon server.

marathon.tmpl:
- Update application/task iteration.
- Replace `getFrontendBackend` by `getBackend`.
2017-07-11 14:35:01 +02:00
Matt Christiansen
4dfbb6d489 Add marathon label to configure basic auth, similar to docker and rancher providers 2017-07-07 23:36:04 +02:00
Zachary Seguin
3eaeb81831 Adds definitions to backend kv template for health checking 2017-06-12 21:54:08 +02:00
Fernandez Ludovic
2833d68f15 Merge branch 'v1.3' into merge-back-1_3_0-rc3 2017-05-24 20:39:38 +02:00
Timo Reimann
9967494996 [k8s] Ignore Ingresses with empty Endpoint subsets.
We previously fell back to using ClusterIPs. However, the approach can
lead to all kinds of problems since Ingresses rely on being able to talk
to Endpoints directly. For instance, it can break stickiness and
retries.
2017-05-23 21:15:06 +02:00
MaZderMind
5f0b215e90 IP Whitelists for Frontend (with Docker- & Kubernetes-Provider Support) 2017-05-19 15:19:29 +02:00
Alex Peters
89da3b15a4 Add basic auth to kubernetes provider 2017-05-03 13:18:40 +02:00
Timo Reimann
d57f83c31c Make Traefik health checks label-configurable with Marathon.
For the two existing health check parameters (path and interval), we add
support for Marathon labels.

Changes in detail:

- Extend the Marathon provider and template.
- Refactor Server.loadConfig to reduce duplication.
- Refactor the healthcheck package slightly to accommodate the changes
  and allow extending by future parameters.
- Update documentation.
2017-04-28 18:17:25 +02:00
Manuel Laufenberg
8a892b21e1 Add Basic Auth per Frontend for Rancher & Docker Dynamic Provider 2017-04-19 21:05:43 +02:00
Florent BENOIT
1158eba7ac Adding docker labels traefik.<servicename>.* properties like
- traefik.mycustomservice.port=443
  -  traefik.mycustomservice.frontend.rule=Path:/mycustomservice
   - traefik.anothercustomservice.port=8080
  -  traefik.anothercustomservice.frontend.rule=Path:/anotherservice

all traffic to frontend /mycustomservice is redirected to the port 443 of the container while using /anotherservice will redirect to the port 8080 of the docker container

More documentation in the docs/toml.md file

Change-Id: Ifaa3bb00ef0a0f38aa189e0ca1586fde8c5ed862
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-03-14 08:45:47 +01:00
Manuel Laufenberg
38bd49b97e add dependency, start provider and fetch data
add tons of labels

Provide - WIP

add rancher data over rancher types

first version of direct fetch - pagination still an issue
2017-02-06 17:02:53 +01:00
Luke Petre
8d3c77a0b9 Add an ECS provider 2017-02-05 18:09:30 +00:00
Brian Akins
225dbcce0a Allow setting circuitbreaker expression via Kubernetes annotation (#1056) 2017-02-03 17:47:48 +01:00
Brian Akins
490427f94d
Allow setting load balancer method and sticky using service annotations 2017-02-02 14:03:39 +00:00
Diego de Oliveira
d74ea22d7d IP-per-task: (#841)
Support IP per task with marathon/mesos
2017-01-06 16:26:50 +01:00
Emile Vauge
dca08af003
Merge v1.1.1 into master
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-12-06 08:44:23 +01:00
Kristian Klausen
a8cb905255 consul/kv.tmpl: weight default value should be a int (#826)
* consul/kv.tmpl: weight default value should be a int

Fix #821

* Use 0 as default weight in all backends
2016-11-23 14:49:55 +01:00
Julien Salleyron
cf8940e80e fix(eureka): Wrong host in rule 2016-11-20 18:25:48 +01:00
Julien Salleyron
2af6cc4d1b feat(provider): Add Eureka Provider 2016-11-16 22:00:24 +01:00
Emile Vauge
404a73a712
fIx marathon template with dots in ID 2016-10-13 15:33:23 +02:00
Emile Vauge
462d8b3e74
Fix Docker & KV templates for sticky
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-09-30 10:57:55 +02:00
Emile Vauge
291c3b6dbc
Fix sticky sessions Docker/Marathon labels 2016-09-30 10:56:47 +02:00
Owen Marshall
c9d4c5ae3e
Fix Docker integration problems 2016-09-30 10:56:17 +02:00
Owen Marshall
be5b1fd92b
docs, sticky session for Docker 2016-09-30 10:56:17 +02:00
Owen Marshall
dc52abf4ce
Add sticky session support to Traefik.
This change adds sticky session support, by using the new
oxy/rr/StickySession feature.

To use it, set traefik.backend.sticky to true.

This is currently only implemented in the wrr load balancer, and against
the Marathon backend, but lifting it should be very doable.

In the wrr load balancer, a cookie called _TRAEFIK_SERVERNAME will be
set with the backend to use.  If the cookie is altered to an invalid
backend server, or the server is removed from the load balancer, the
next server will be used instead.

Otherwise, the cookie will be checked in Oxy's rr on access and if valid
the connection will be wired through to it.
2016-09-30 10:56:17 +02:00
Samuel BERTHE
ced69b8397
refacto(constraint-kv): Move constraint checking out of template 2016-09-21 14:33:45 +02:00
Samuel BERTHE
013808956c
feat(constraints): Supports kv stores backends 2016-09-21 14:33:45 +02:00
Bruce Lee
f7f17f0057 enable consul catalog to use maxconn 2016-09-15 12:11:37 -04:00
Bruce Lee
99ca5d0a03 Add ability for marathon provider to set maxconn values
Initial implementation: Force both to be present to trigger behavior.

add ability to see rendered template in debug

add support for loadbalancer and circuit breaker specification

add documentation for new configuration
2016-09-14 16:52:02 -04:00
Bruce Lee
d89bdfbd27 Add backend features to docker 2016-09-14 14:51:31 -04:00
Phil Kates
79dd72f53d
Prioritize kubernetes routes by path length
The Kubernetes provider wasn't setting priorities which was causing
shorter paths to get chosen before longer ones. This now matches the
[documentation](https://github.com/containous/traefik/blob/master/docs/basics.md#priorities)
2016-08-03 11:37:22 -07:00
julien
5afcf17706 add mesos provider inspired by mesos-dns & marathon provider 2016-07-20 11:56:14 +02:00
Emile Vauge
15e04bb55d
Fix consul catalog issue with dot in serviceName
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-06-23 16:33:54 +02:00
Emile Vauge
f4cb4bb1b8
Add routes priorities in providers
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-06-07 09:18:37 +02:00
Erin Dachtler
df7e1cf078 Squashed commit of the following:
commit 468cdf5c74b8df80fe6cc093feda84d124d47460
Author: Erin Dachtler <download333@gmail.com>
Date:   Mon May 30 17:21:50 2016 -0700

    Documentation update

commit bcbe622141fc333579177e056b49d418997c511d
Author: Erin Dachtler <download333@gmail.com>
Date:   Sat May 28 15:32:34 2016 -0700

    Whoops, forgot to fmt

commit 1ad5f1052541372722adc372069da094b422c793
Author: Erin Dachtler <download333@gmail.com>
Date:   Sat May 28 14:56:04 2016 -0700

    Added getIPAddress helper for docker template, and tests
2016-05-31 22:11:17 -07:00
Marcus Stong
be209ed30c #216: sets passHostHeader to true by default (#351) 2016-05-10 13:43:24 +02:00
Poney baker
378a261e64 feat(consul-provider): If Service.Address is nil then use Node.Address
test(consul-catalog): Test on backend-name and backend-address
2016-04-27 21:09:42 +02:00
Emile Vauge
c0dd4c3209
Add unit test
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-04-22 13:57:00 +02:00
Emile Vauge
d82e1342fb
Fix integration test
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-04-22 13:57:00 +02:00
emile
720912e880
Add kubernetes Ingress backend
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-04-22 13:57:00 +02:00
kevin
a15578a8f6 Add support for maximum connections for backends. 2016-04-13 09:37:11 -07:00
Emile Vauge
a9e615b3c7 Fix period in frontend name in KV store 2016-04-13 14:56:51 +02:00
Samuel BERTHE
4f044cf2f9 feat(consul-catalog-provider): + setting unique backend name + backend redirecting to internal container ip 2016-04-13 08:05:44 +02:00
Emile Vauge
8737530a7d
Refactor frontends rules
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-03-31 13:11:07 +02:00
Emile Vauge
defbb44b35 Fix docker network
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-03-01 11:52:30 +00:00
David Keijser
ae275c9e60 Consul catalog provider
Fixes #176
2016-02-24 09:23:27 +01:00
emile
c6c3af8099
Fix regression on marathon backend
Signed-off-by: emile <emile@vauge.com>
2016-02-12 15:03:28 +01:00
emile
a8cc26fd91
Add entrypoints to providers 2016-02-10 12:14:16 +01:00
Graham Taylor
2d79c500df Fix #170 - lookup backend for marathon plugin so we can specify traefik.backend via labels on the container 2016-02-05 18:01:47 +00:00
Dylan Meissner
cfbd43d1ee Marathon provider uses port or portIndex from label. 2016-01-12 06:46:29 -08:00
Dylan Meissner
a9925c7521 The included Marathon tmpl converts multiple slashes in Marathon app names to dashes. 2015-12-05 10:02:39 -08:00
emile
e728f32a15 Removes getBool from kv provider, fixes https://github.com/emilevauge/traefik/issues/117 2015-12-04 09:28:43 +01:00
emile
6e62625ebf Add GetBool function in KV provider, used by passHostHeader 2015-11-22 23:39:43 +01:00
Benny Hansson
e90cb6b53b Add passHostHeader to frontend definition. 2015-11-16 22:51:52 +01:00
emile
1e99ecf583 Add passHostHeader in frontend configuration, added traefik.frontend.passHostHeader label 2015-11-02 08:40:54 +01:00
emile
aaeb7cdffd Correct BoltDB backend. Fixes #68 2015-10-23 22:21:16 +02:00
emile
d671cc3821 Adds traefik.frontend. rule and value labels in Docker and Marathon. Fixes #64. Fixes #73 2015-10-23 17:46:50 +02:00
emile
5dea2e7902 Remove providerTemplates dir, moved in templates 2015-10-23 17:46:50 +02:00
Fernandez Ludovic
781c6aaafa feat(api): add api routes for Frontend Routes
- add `/api/providers/{provider}/frontends/{frontend}/routes`
- add `/api/providers/{provider}/frontends/{frontend}/routes/{route}`
2015-10-08 21:44:29 +02:00
emile
93b5410987 libkv support https://github.com/EmileVauge/traefik/issues/25 https://github.com/EmileVauge/traefik/issues/9 2015-10-02 11:36:16 +02:00
Thorhallur Sverrisson
a07e395181 Refactoring REST API to handle multiple providers.
I changed what I think is needed and I have done manual testing on this.

I tried to keep the changes to a minimun.

The changes are approx:

* HTML output now includes the provider name in parenthesis.
  * I'm not versed in bootstrap, should the output group providers in a
  * table?
* PUT is only enabled on /api/web.
* GET on /api returns a map containing all providers configuration
* GET on /api/{provider} will return the config as before on that
* provider.
2015-09-23 11:45:18 +00:00
emile
0bdd537fb4 Configuration on cicuitbreakers and load balancers 2015-09-28 23:16:32 +02:00
emile
bb12e1c48c URL case corrections 2015-09-24 22:17:40 +02:00
emile
ef9e773b9f refactor rules, api enhancements 2015-09-15 18:35:32 +02:00
emile
a4f542c02f refactor rules -> routes, routes -> frontends 2015-09-15 16:09:21 +02:00
emile
e017e4906e config template, backends 2015-09-14 15:38:58 +02:00
emile
ee13d570d8 Weights 2015-09-11 09:59:29 +02:00
emile
e2d2f1f1d1 Traefik 2015-09-10 16:46:27 +02:00
emile
46ef489b03 NotFoundHandler 2015-09-10 15:13:35 +02:00
emile
be179e6b68 Server url 2015-09-10 09:04:42 +02:00
emile
6f8f3e449d refactoring unique backend by route 2015-09-09 17:41:33 +02:00
emile
730fbfe9c5 docker override port, host, backend
reuse loadbalancer
2015-09-09 16:49:51 +02:00
emile
d3071ca110 web provider renderer 2015-09-09 10:29:49 +02:00