Merge remote-tracking branch 'upstream/v1.3' into merge-v1_3
This commit is contained in:
commit
8ad31d6eb4
10 changed files with 357 additions and 245 deletions
170
CHANGELOG.md
170
CHANGELOG.md
|
@ -1,76 +1,114 @@
|
|||
# Change Log
|
||||
|
||||
## [v1.3.0-rc2](https://github.com/containous/traefik/tree/v1.3.0-rc2) (2017-05-16)
|
||||
[Full Changelog](https://github.com/containous/traefik/compare/v1.3.0-rc1...v1.3.0-rc2)
|
||||
[All Commits](https://github.com/containous/traefik/compare/v1.3.0-rc1...v1.3.0-rc2)
|
||||
|
||||
**Merged pull requests:**
|
||||
**Enhancements:**
|
||||
- Fixed ReplacePath rule executing out of order, when combined with PathPrefixStrip [#1577](https://api.github.com/repos/containous/traefik/issues/1577) ([aantono](https://api.github.com/users/aantono))
|
||||
|
||||
- doc: Traefik cluster in beta. [\#1610](https://github.com/containous/traefik/pull/1610) ([ldez](https://github.com/ldez))
|
||||
- SemaphoreCI on 1.3 branch [\#1608](https://github.com/containous/traefik/pull/1608) ([ldez](https://github.com/ldez))
|
||||
- Fix empty basic auth [\#1601](https://github.com/containous/traefik/pull/1601) ([emilevauge](https://github.com/emilevauge))
|
||||
- Fix stats hijack [\#1598](https://github.com/containous/traefik/pull/1598) ([emilevauge](https://github.com/emilevauge))
|
||||
- Fix exported fields providers [\#1588](https://github.com/containous/traefik/pull/1588) ([emilevauge](https://github.com/emilevauge))
|
||||
- Maintain sticky flag on LB method validation failure. [\#1585](https://github.com/containous/traefik/pull/1585) ([timoreimann](https://github.com/timoreimann))
|
||||
- \[Kubernetes\] Ignore missing pass host header annotation. [\#1581](https://github.com/containous/traefik/pull/1581) ([timoreimann](https://github.com/timoreimann))
|
||||
- Fixed ReplacePath rule executing out of order, when combined with PathPrefixStrip [\#1577](https://github.com/containous/traefik/pull/1577) ([aantono](https://github.com/aantono))
|
||||
**Bug fixes:**
|
||||
- [Kubernetes] Ignore missing pass host header annotation. [#1581](https://api.github.com/repos/containous/traefik/issues/1581) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Maintain sticky flag on LB method validation failure. [#1585](https://api.github.com/repos/containous/traefik/issues/1585) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Fix exported fields providers [#1588](https://api.github.com/repos/containous/traefik/issues/1588) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- Fix stats hijack [#1598](https://api.github.com/repos/containous/traefik/issues/1598) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- Fix empty basic auth [#1601](https://api.github.com/repos/containous/traefik/issues/1601) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
|
||||
## [v1.3.0-rc1](https://github.com/containous/traefik/tree/v1.3.0-rc1) (2017-05-04)
|
||||
[Full Changelog](https://github.com/containous/traefik/compare/v1.2.3...v1.3.0-rc1)
|
||||
**Documentation:**
|
||||
- doc: Traefik cluster in beta. [#1610](https://api.github.com/repos/containous/traefik/issues/1610) ([ldez](https://api.github.com/users/ldez))
|
||||
|
||||
**Merged pull requests:**
|
||||
## [v1.3.0-rc1](https://github.com/containous/traefik/tree/v1.3.0-rc1) (2017-05-05)
|
||||
[All Commits](https://github.com/containous/traefik/compare/v1.2.0-rc1...v1.3.0-rc1)
|
||||
|
||||
- Working UI [\#1542](https://github.com/containous/traefik/pull/1542) ([maxwo](https://github.com/maxwo))
|
||||
- Revert "First stage of access logging middleware. Initially without … [\#1541](https://github.com/containous/traefik/pull/1541) ([emilevauge](https://github.com/emilevauge))
|
||||
- Add tests lost during PR 1320. [\#1540](https://github.com/containous/traefik/pull/1540) ([timoreimann](https://github.com/timoreimann))
|
||||
- Merge v1.2.3 master [\#1538](https://github.com/containous/traefik/pull/1538) ([emilevauge](https://github.com/emilevauge))
|
||||
- refactor: fix for PR with master branch. [\#1537](https://github.com/containous/traefik/pull/1537) ([ldez](https://github.com/ldez))
|
||||
- Makefile target to enable parallel jobs [\#1535](https://github.com/containous/traefik/pull/1535) ([atbore-phx](https://github.com/atbore-phx))
|
||||
- Revert "Vendor generated file" [\#1534](https://github.com/containous/traefik/pull/1534) ([ldez](https://github.com/ldez))
|
||||
- feat\(rancher\): added constraint management for rancher provider [\#1527](https://github.com/containous/traefik/pull/1527) ([yyekhlef](https://github.com/yyekhlef))
|
||||
- Fix systemd watchdog feature [\#1525](https://github.com/containous/traefik/pull/1525) ([guilhem](https://github.com/guilhem))
|
||||
- \[Marathon\] Bump go-marathon dep [\#1524](https://github.com/containous/traefik/pull/1524) ([jangie](https://github.com/jangie))
|
||||
- Make port deterministic [\#1523](https://github.com/containous/traefik/pull/1523) ([tanyadegurechaff](https://github.com/tanyadegurechaff))
|
||||
- Add unit tests for package safe [\#1517](https://github.com/containous/traefik/pull/1517) ([gottwald](https://github.com/gottwald))
|
||||
- doc: small documentation review [\#1516](https://github.com/containous/traefik/pull/1516) ([ldez](https://github.com/ldez))
|
||||
- doc: enhance Github templates. [\#1515](https://github.com/containous/traefik/pull/1515) ([ldez](https://github.com/ldez))
|
||||
- Re-exclude /dist/traefik from .dockerignore. [\#1497](https://github.com/containous/traefik/pull/1497) ([timoreimann](https://github.com/timoreimann))
|
||||
- Move Docker test provider instantiation into t.Run body. [\#1489](https://github.com/containous/traefik/pull/1489) ([timoreimann](https://github.com/timoreimann))
|
||||
- Add basic auth to kubernetes provider [\#1488](https://github.com/containous/traefik/pull/1488) ([alpe](https://github.com/alpe))
|
||||
- Fix Consul catalog prefix flags [\#1486](https://github.com/containous/traefik/pull/1486) ([emilevauge](https://github.com/emilevauge))
|
||||
- doc: enhance GitHub template. [\#1482](https://github.com/containous/traefik/pull/1482) ([ldez](https://github.com/ldez))
|
||||
- Check for explicitly defined Marathon port first. [\#1474](https://github.com/containous/traefik/pull/1474) ([timoreimann](https://github.com/timoreimann))
|
||||
- Correct typo in code comment. [\#1473](https://github.com/containous/traefik/pull/1473) ([mattcollier](https://github.com/mattcollier))
|
||||
- Update dockerignore to ignore dist and sites [\#1470](https://github.com/containous/traefik/pull/1470) ([vdemeester](https://github.com/vdemeester))
|
||||
- Improve documentation for frontend rules. [\#1469](https://github.com/containous/traefik/pull/1469) ([timoreimann](https://github.com/timoreimann))
|
||||
- Mention Traefik pronunciation in docs too. [\#1468](https://github.com/containous/traefik/pull/1468) ([timoreimann](https://github.com/timoreimann))
|
||||
- Fix typo in command line help. [\#1467](https://github.com/containous/traefik/pull/1467) ([mattcollier](https://github.com/mattcollier))
|
||||
- Vendor generated file [\#1464](https://github.com/containous/traefik/pull/1464) ([vdemeester](https://github.com/vdemeester))
|
||||
- update wording [\#1458](https://github.com/containous/traefik/pull/1458) ([ben-st](https://github.com/ben-st))
|
||||
- Fix Rancher backend left in uncommented state [\#1455](https://github.com/containous/traefik/pull/1455) ([martinbaillie](https://github.com/martinbaillie))
|
||||
- Fix Rancher API pagination limits [\#1453](https://github.com/containous/traefik/pull/1453) ([martinbaillie](https://github.com/martinbaillie))
|
||||
- Extract some code in packages [\#1449](https://github.com/containous/traefik/pull/1449) ([vdemeester](https://github.com/vdemeester))
|
||||
- Update golang.org/x/sys to fix windows compilation [\#1448](https://github.com/containous/traefik/pull/1448) ([vdemeester](https://github.com/vdemeester))
|
||||
- \[ci\] Don't run binary twice [\#1447](https://github.com/containous/traefik/pull/1447) ([vdemeester](https://github.com/vdemeester))
|
||||
- Pull images before running CI [\#1445](https://github.com/containous/traefik/pull/1445) ([vdemeester](https://github.com/vdemeester))
|
||||
- Extract providers to their own packages [\#1444](https://github.com/containous/traefik/pull/1444) ([vdemeester](https://github.com/vdemeester))
|
||||
- Pass stripped prefix downstream as header \(\#985\) [\#1442](https://github.com/containous/traefik/pull/1442) ([martinbaillie](https://github.com/martinbaillie))
|
||||
- Few refactoring around the docker provider [\#1440](https://github.com/containous/traefik/pull/1440) ([vdemeester](https://github.com/vdemeester))
|
||||
- feat\(webui\): Dashboard filter [\#1437](https://github.com/containous/traefik/pull/1437) ([ldez](https://github.com/ldez))
|
||||
- Updating Kubernetes tests to properly test missing endpoints code path [\#1436](https://github.com/containous/traefik/pull/1436) ([Regner](https://github.com/Regner))
|
||||
- New access logger [\#1408](https://github.com/containous/traefik/pull/1408) ([rjshep](https://github.com/rjshep))
|
||||
- Fix default timeouts for Marathon provider. [\#1398](https://github.com/containous/traefik/pull/1398) ([timoreimann](https://github.com/timoreimann))
|
||||
- Add Path Replacement Rule [\#1374](https://github.com/containous/traefik/pull/1374) ([ssttevee](https://github.com/ssttevee))
|
||||
- License 2017, Træfɪk =\> Træfik [\#1368](https://github.com/containous/traefik/pull/1368) ([emilevauge](https://github.com/emilevauge))
|
||||
- Add libkv Username and Password [\#1357](https://github.com/containous/traefik/pull/1357) ([tcolgate](https://github.com/tcolgate))
|
||||
- \[Marathon\] Detect proper hostname automatically. [\#1345](https://github.com/containous/traefik/pull/1345) ([diegooliveira](https://github.com/diegooliveira))
|
||||
- Improve rancher provider handling of service and container health states [\#1343](https://github.com/containous/traefik/pull/1343) ([kelchm](https://github.com/kelchm))
|
||||
- Fix regex with PathStrip [\#1339](https://github.com/containous/traefik/pull/1339) ([seguins](https://github.com/seguins))
|
||||
- Add global health check interval parameter. [\#1338](https://github.com/containous/traefik/pull/1338) ([timoreimann](https://github.com/timoreimann))
|
||||
- make docs more clear about how to work with the current api [\#1337](https://github.com/containous/traefik/pull/1337) ([SantoDE](https://github.com/SantoDE))
|
||||
- Make Traefik health checks label-configurable with Marathon. [\#1320](https://github.com/containous/traefik/pull/1320) ([timoreimann](https://github.com/timoreimann))
|
||||
- using more sensible consul blocking query to detect health check changes [\#1241](https://github.com/containous/traefik/pull/1241) ([vholovko](https://github.com/vholovko))
|
||||
- Fix error in documentation for Docker labels [\#1179](https://github.com/containous/traefik/pull/1179) ([bgandon](https://github.com/bgandon))
|
||||
- Add Basic Auth per Frontend [\#1147](https://github.com/containous/traefik/pull/1147) ([SantoDE](https://github.com/SantoDE))
|
||||
**Enhancements:**
|
||||
- Add Basic Auth per Frontend [#1147](https://api.github.com/repos/containous/traefik/issues/1147) ([SantoDE](https://api.github.com/users/SantoDE))
|
||||
- Kubernetes support externalname service [#1149](https://api.github.com/repos/containous/traefik/issues/1149) ([Regner](https://api.github.com/users/Regner))
|
||||
- add dynamodb backend [#1158](https://api.github.com/repos/containous/traefik/issues/1158) ([tskinn](https://api.github.com/users/tskinn))
|
||||
- Support cluster-external Kubernetes client. [#1159](https://api.github.com/repos/containous/traefik/issues/1159) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Add Traefik TOML sample section on how to bind to specific IP addr. [#1194](https://api.github.com/repos/containous/traefik/issues/1194) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- kv: Ignore backend servers with no url [#1196](https://api.github.com/repos/containous/traefik/issues/1196) ([klausenbusk](https://api.github.com/users/klausenbusk))
|
||||
- Tighten regex match for wildcard certs [Addendum to #1018] [#1227](https://api.github.com/repos/containous/traefik/issues/1227) ([dtomcej](https://api.github.com/users/dtomcej))
|
||||
- Feature web root path [#1233](https://api.github.com/repos/containous/traefik/issues/1233) ([tcoupin](https://api.github.com/users/tcoupin))
|
||||
- using more sensible consul blocking query to detect health check changes [#1241](https://api.github.com/repos/containous/traefik/issues/1241) ([vholovko](https://api.github.com/users/vholovko))
|
||||
- Allow multiple rules from docker labels containers with traefik.<servicename>.* properties [#1257](https://api.github.com/repos/containous/traefik/issues/1257) ([benoitf](https://api.github.com/users/benoitf))
|
||||
- Update TLS Ciphers for Go 1.8 [#1276](https://api.github.com/repos/containous/traefik/issues/1276) ([kekoav](https://api.github.com/users/kekoav))
|
||||
- Start health checks early. [#1319](https://api.github.com/repos/containous/traefik/issues/1319) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Make Traefik health checks label-configurable with Marathon. [#1320](https://api.github.com/repos/containous/traefik/issues/1320) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Append template section asking for debug log output. [#1324](https://api.github.com/repos/containous/traefik/issues/1324) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Add global health check interval parameter. [#1338](https://api.github.com/repos/containous/traefik/issues/1338) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Fix regex with PathStrip [#1339](https://api.github.com/repos/containous/traefik/issues/1339) ([seguins](https://api.github.com/users/seguins))
|
||||
- Add IdleConnTimeout to Traefik's http.server settings [#1340](https://api.github.com/repos/containous/traefik/issues/1340) ([bparli](https://api.github.com/users/bparli))
|
||||
- Improve rancher provider handling of service and container health states [#1343](https://api.github.com/repos/containous/traefik/issues/1343) ([kelchm](https://api.github.com/users/kelchm))
|
||||
- [Marathon] Detect proper hostname automatically. [#1345](https://api.github.com/repos/containous/traefik/issues/1345) ([diegooliveira](https://api.github.com/users/diegooliveira))
|
||||
- Use TOML-compatible duration type. [#1350](https://api.github.com/repos/containous/traefik/issues/1350) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Add libkv Username and Password [#1357](https://api.github.com/repos/containous/traefik/issues/1357) ([tcolgate](https://api.github.com/users/tcolgate))
|
||||
- Make toml Bucket array homogeneous [#1369](https://api.github.com/repos/containous/traefik/issues/1369) ([Starefossen](https://api.github.com/users/Starefossen))
|
||||
- Add Path Replacement Rule [#1374](https://api.github.com/repos/containous/traefik/issues/1374) ([ssttevee](https://api.github.com/users/ssttevee))
|
||||
- New access logger [#1408](https://api.github.com/repos/containous/traefik/issues/1408) ([rjshep](https://api.github.com/users/rjshep))
|
||||
- feat(webui): Dashboard filter [#1437](https://api.github.com/repos/containous/traefik/issues/1437) ([ldez](https://api.github.com/users/ldez))
|
||||
- Pass stripped prefix downstream as header (#985) [#1442](https://api.github.com/repos/containous/traefik/issues/1442) ([martinbaillie](https://api.github.com/users/martinbaillie))
|
||||
- Extract some code in packages [#1449](https://api.github.com/repos/containous/traefik/issues/1449) ([vdemeester](https://api.github.com/users/vdemeester))
|
||||
- Fix Rancher API pagination limits [#1453](https://api.github.com/repos/containous/traefik/issues/1453) ([martinbaillie](https://api.github.com/users/martinbaillie))
|
||||
- Fix Rancher backend left in uncommented state [#1455](https://api.github.com/repos/containous/traefik/issues/1455) ([martinbaillie](https://api.github.com/users/martinbaillie))
|
||||
- Vendor generated file [#1464](https://api.github.com/repos/containous/traefik/issues/1464) ([vdemeester](https://api.github.com/users/vdemeester))
|
||||
- Add basic auth to kubernetes provider [#1488](https://api.github.com/repos/containous/traefik/issues/1488) ([alpe](https://api.github.com/users/alpe))
|
||||
- Add unit tests for package safe [#1517](https://api.github.com/repos/containous/traefik/issues/1517) ([gottwald](https://api.github.com/users/gottwald))
|
||||
- feat(rancher): added constraint management for rancher provider [#1527](https://api.github.com/repos/containous/traefik/issues/1527) ([yyekhlef](https://api.github.com/users/yyekhlef))
|
||||
- refactor: fix for PR with master branch. [#1537](https://api.github.com/repos/containous/traefik/issues/1537) ([ldez](https://api.github.com/users/ldez))
|
||||
- Add tests lost during PR 1320. [#1540](https://api.github.com/repos/containous/traefik/issues/1540) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Working UI [#1542](https://api.github.com/repos/containous/traefik/issues/1542) ([maxwo](https://api.github.com/users/maxwo))
|
||||
|
||||
**Bug fixes:**
|
||||
- Fix default timeouts for Marathon provider. [#1398](https://api.github.com/repos/containous/traefik/issues/1398) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Update golang.org/x/sys to fix windows compilation [#1448](https://api.github.com/repos/containous/traefik/issues/1448) ([vdemeester](https://api.github.com/users/vdemeester))
|
||||
- Check for explicitly defined Marathon port first. [#1474](https://api.github.com/repos/containous/traefik/issues/1474) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Fix Consul catalog prefix flags [#1486](https://api.github.com/repos/containous/traefik/issues/1486) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- Move Docker test provider instantiation into t.Run body. [#1489](https://api.github.com/repos/containous/traefik/issues/1489) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Make port deterministic [#1523](https://api.github.com/repos/containous/traefik/issues/1523) ([tanyadegurechaff](https://api.github.com/users/tanyadegurechaff))
|
||||
- [Marathon] Bump go-marathon dep [#1524](https://api.github.com/repos/containous/traefik/issues/1524) ([jangie](https://api.github.com/users/jangie))
|
||||
- Fix systemd watchdog feature [#1525](https://api.github.com/repos/containous/traefik/issues/1525) ([guilhem](https://api.github.com/users/guilhem))
|
||||
- Revert "Vendor generated file" [#1534](https://api.github.com/repos/containous/traefik/issues/1534) ([ldez](https://api.github.com/users/ldez))
|
||||
|
||||
**Documentation:**
|
||||
- Fix prometheus metrics example [#1157](https://api.github.com/repos/containous/traefik/issues/1157) ([solidnerd](https://api.github.com/users/solidnerd))
|
||||
- Fix error in documentation for Docker labels [#1179](https://api.github.com/repos/containous/traefik/issues/1179) ([bgandon](https://api.github.com/users/bgandon))
|
||||
- Motivate and explain regular expression rules. [#1216](https://api.github.com/repos/containous/traefik/issues/1216) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Add @trecloux to Maintainers [#1226](https://api.github.com/repos/containous/traefik/issues/1226) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- Change a word in the documentation [#1274](https://api.github.com/repos/containous/traefik/issues/1274) ([sroze](https://api.github.com/users/sroze))
|
||||
- make docs more clear about how to work with the current api [#1337](https://api.github.com/repos/containous/traefik/issues/1337) ([SantoDE](https://api.github.com/users/SantoDE))
|
||||
- Add documentation about k8s Helm Chart [#1367](https://api.github.com/repos/containous/traefik/issues/1367) ([seguins](https://api.github.com/users/seguins))
|
||||
- License 2017, Træfɪk => Træfik [#1368](https://api.github.com/repos/containous/traefik/issues/1368) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- Add documentation for k8s RBAC configuration [#1404](https://api.github.com/repos/containous/traefik/issues/1404) ([aolwas](https://api.github.com/users/aolwas))
|
||||
- update wording [#1458](https://api.github.com/repos/containous/traefik/issues/1458) ([ben-st](https://api.github.com/users/ben-st))
|
||||
- Fix typo in command line help. [#1467](https://api.github.com/repos/containous/traefik/issues/1467) ([mattcollier](https://api.github.com/users/mattcollier))
|
||||
- Mention Traefik pronunciation in docs too. [#1468](https://api.github.com/repos/containous/traefik/issues/1468) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Improve documentation for frontend rules. [#1469](https://api.github.com/repos/containous/traefik/issues/1469) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Correct typo in code comment. [#1473](https://api.github.com/repos/containous/traefik/issues/1473) ([mattcollier](https://api.github.com/users/mattcollier))
|
||||
- doc: enhance GitHub template. [#1482](https://api.github.com/repos/containous/traefik/issues/1482) ([ldez](https://api.github.com/users/ldez))
|
||||
- doc: enhance Github templates. [#1515](https://api.github.com/repos/containous/traefik/issues/1515) ([ldez](https://api.github.com/users/ldez))
|
||||
- doc: small documentation review [#1516](https://api.github.com/repos/containous/traefik/issues/1516) ([ldez](https://api.github.com/users/ldez))
|
||||
|
||||
**Misc:**
|
||||
- Vendor dependencies [#1144](https://api.github.com/repos/containous/traefik/issues/1144) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Refactor k8s rule type annotation parsing/retrieval. [#1151](https://api.github.com/repos/containous/traefik/issues/1151) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Upgrade dependencies. [#1170](https://api.github.com/repos/containous/traefik/issues/1170) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Remove .gitattributes file. [#1172](https://api.github.com/repos/containous/traefik/issues/1172) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Upgrade k8s.io/client-go to version 2 [#1178](https://api.github.com/repos/containous/traefik/issues/1178) ([errm](https://api.github.com/users/errm))
|
||||
- Adding support for Traefik to respect the K8s ingress class annotation [#1182](https://api.github.com/repos/containous/traefik/issues/1182) ([Regner](https://api.github.com/users/Regner))
|
||||
- Allow usersFile to be specified for basic or digest auth [#1189](https://api.github.com/repos/containous/traefik/issues/1189) ([krancour](https://api.github.com/users/krancour))
|
||||
- Merge v1.2.0 rc2 master [#1208](https://api.github.com/repos/containous/traefik/issues/1208) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- Add @timoreimann to list of maintainers. [#1215](https://api.github.com/repos/containous/traefik/issues/1215) ([timoreimann](https://api.github.com/users/timoreimann))
|
||||
- Use docker-compose labels for frontend and backend names [#1235](https://api.github.com/repos/containous/traefik/issues/1235) ([tcoupin](https://api.github.com/users/tcoupin))
|
||||
- Bump go 1.8 [#1259](https://api.github.com/repos/containous/traefik/issues/1259) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- fix consul sample endpoints [#1303](https://api.github.com/repos/containous/traefik/issues/1303) ([ruslansennov](https://api.github.com/users/ruslansennov))
|
||||
- Merge v1.2.1 master [#1383](https://api.github.com/repos/containous/traefik/issues/1383) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- Fix typo in server.go [#1386](https://api.github.com/repos/containous/traefik/issues/1386) ([mihaitodor](https://api.github.com/users/mihaitodor))
|
||||
- Allow traefik.port to not be in the list of marathon ports [#1394](https://api.github.com/repos/containous/traefik/issues/1394) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- Updating Kubernetes tests to properly test missing endpoints code path [#1436](https://api.github.com/repos/containous/traefik/issues/1436) ([Regner](https://api.github.com/users/Regner))
|
||||
- Few refactoring around the docker provider [#1440](https://api.github.com/repos/containous/traefik/issues/1440) ([vdemeester](https://api.github.com/users/vdemeester))
|
||||
- Extract providers to their own packages [#1444](https://api.github.com/repos/containous/traefik/issues/1444) ([vdemeester](https://api.github.com/users/vdemeester))
|
||||
- Merge v1.2.3 master [#1538](https://api.github.com/repos/containous/traefik/issues/1538) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- Revert "First stage of access logging middleware. Initially without … [#1541](https://api.github.com/repos/containous/traefik/issues/1541) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
- Prepare release v1.3.0-rc1 [#1553](https://api.github.com/repos/containous/traefik/issues/1553) ([emilevauge](https://api.github.com/users/emilevauge))
|
||||
|
||||
## [v1.2.3](https://github.com/containous/traefik/tree/v1.2.3) (2017-04-13)
|
||||
[Full Changelog](https://github.com/containous/traefik/compare/v1.2.2...v1.2.3)
|
||||
|
@ -972,4 +1010,4 @@
|
|||
|
||||
|
||||
|
||||
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
||||
\* *This Change Log was automatically generated by [gcg](https://github.com/ldez/gcg)*
|
|
@ -7,6 +7,7 @@ import (
|
|||
fmtlog "log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
@ -206,6 +207,13 @@ func run(traefikConfiguration *server.TraefikConfiguration) {
|
|||
}
|
||||
log.SetLevel(level)
|
||||
if len(globalConfiguration.TraefikLogsFile) > 0 {
|
||||
dir := filepath.Dir(globalConfiguration.TraefikLogsFile)
|
||||
|
||||
err := os.MkdirAll(dir, 0755)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to create log path %s: %s", dir, err)
|
||||
}
|
||||
|
||||
fi, err := os.OpenFile(globalConfiguration.TraefikLogsFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
|
||||
defer func() {
|
||||
if err := fi.Close(); err != nil {
|
||||
|
|
|
@ -12,68 +12,15 @@ on your machine, as it is the quickest way to get a local Kubernetes cluster set
|
|||
|
||||
2. The `kubectl` binary should be [installed on your workstation](http://kubernetes.io/docs/getting-started-guides/minikube/#download-kubectl).
|
||||
|
||||
## Deploy Træfik using a Deployment object
|
||||
### Role Based Access Control configuration (Kubernetes 1.6+ only)
|
||||
|
||||
We are going to deploy Træfik with a
|
||||
[Deployment](http://kubernetes.io/docs/user-guide/deployments/), as this will
|
||||
allow you to easily roll out config changes or update the image.
|
||||
|
||||
```yaml
|
||||
kind: Deployment
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
name: traefik-ingress-lb
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
- image: traefik
|
||||
name: traefik-ingress-lb
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 30Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 20Mi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
hostPort: 80
|
||||
- containerPort: 8080
|
||||
args:
|
||||
- --web
|
||||
- --kubernetes
|
||||
```
|
||||
[examples/k8s/traefik.yaml](https://github.com/containous/traefik/tree/master/examples/k8s/traefik.yaml)
|
||||
|
||||
> notice that we binding port 80 on the Træfik container to port 80 on the host.
|
||||
> With a multi node cluster we might expose Træfik with a NodePort or LoadBalancer service
|
||||
> and run more than 1 replica of Træfik for high availability.
|
||||
|
||||
To deploy Træfik to your cluster start by submitting the deployment to the cluster with `kubectl`:
|
||||
|
||||
```sh
|
||||
kubectl apply -f examples/k8s/traefik.yaml
|
||||
```
|
||||
### Role Based Access Control configuration (optional)
|
||||
|
||||
Kubernetes introduces [Role Based Access Control (RBAC)](https://kubernetes.io/docs/admin/authorization/) in 1.6+ to allow fine-grained control
|
||||
Kubernetes introduces [Role Based Access Control (RBAC)](https://kubernetes.io/docs/admin/authorization/rbac/) in 1.6+ to allow fine-grained control
|
||||
of Kubernetes resources and api.
|
||||
|
||||
If your cluster is configured with RBAC, you need to authorize Traefik to use
|
||||
kubernetes API using ClusterRole, ServiceAccount and ClusterRoleBinding resources:
|
||||
If your cluster is configured with RBAC, you may need to authorize Traefik to use
|
||||
kubernetes API using ClusterRole and ClusterRoleBinding resources:
|
||||
|
||||
_Note: your cluster may have suitable ClusterRoles already setup, but the following should work everywhere_
|
||||
|
||||
```yaml
|
||||
---
|
||||
|
@ -101,12 +48,6 @@ rules:
|
|||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
|
@ -121,10 +62,75 @@ subjects:
|
|||
namespace: kube-system
|
||||
```
|
||||
|
||||
Then you add the service account information to Traefik deployment spec:
|
||||
`serviceAccountName: traefik-ingress-controller`
|
||||
[examples/k8s/traefik-rbac.yaml](https://github.com/containous/traefik/tree/master/examples/k8s/traefik-rbac.yaml)
|
||||
|
||||
[examples/k8s/traefik-with-rbac.yaml](https://github.com/containous/traefik/tree/master/examples/k8s/traefik-with-rbac.yaml)
|
||||
```shell
|
||||
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/traefik-rbac.yaml
|
||||
```
|
||||
|
||||
## Deploy Træfik using a Deployment object
|
||||
|
||||
We are going to deploy Træfik with a
|
||||
[Deployment](http://kubernetes.io/docs/user-guide/deployments/), as this will
|
||||
allow you to easily roll out config changes or update the image.
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
name: traefik-ingress-lb
|
||||
spec:
|
||||
serviceAccountName: traefik-ingress-controller
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
- image: traefik
|
||||
name: traefik-ingress-lb
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 30Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 20Mi
|
||||
ports:
|
||||
- containerPort: 80
|
||||
hostPort: 80
|
||||
- containerPort: 8080
|
||||
args:
|
||||
- --web
|
||||
- --kubernetes
|
||||
```
|
||||
[examples/k8s/traefik.yaml](https://github.com/containous/traefik/tree/master/examples/k8s/traefik.yaml)
|
||||
|
||||
> notice that we binding port 80 on the Træfik container to port 80 on the host.
|
||||
> With a multi node cluster we might expose Træfik with a NodePort or LoadBalancer service
|
||||
> and run more than 1 replica of Træfik for high availability.
|
||||
|
||||
To deploy Træfik to your cluster start by submitting the deployment to the cluster with `kubectl`:
|
||||
|
||||
```shell
|
||||
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/traefik.yaml
|
||||
```
|
||||
|
||||
### Check the deployment
|
||||
|
||||
|
@ -132,7 +138,7 @@ Now lets check if our deployment was successful.
|
|||
|
||||
Start by listing the pods in the `kube-system` namespace:
|
||||
|
||||
```sh
|
||||
```shell
|
||||
$kubectl --namespace=kube-system get pods
|
||||
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
|
@ -207,7 +213,7 @@ spec:
|
|||
[examples/k8s/ui.yaml](https://github.com/containous/traefik/tree/master/examples/k8s/ui.yaml)
|
||||
|
||||
```shell
|
||||
kubectl apply -f examples/k8s/ui.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/ui.yaml
|
||||
```
|
||||
|
||||
Now lets setup an entry in our /etc/hosts file to route `traefik-ui.minikube`
|
||||
|
@ -334,7 +340,7 @@ spec:
|
|||
[examples/k8s/cheese-deployments.yaml](https://github.com/containous/traefik/tree/master/examples/k8s/cheese-deployments.yaml)
|
||||
|
||||
```shell
|
||||
kubectl apply -f examples/k8s/cheese-deployments.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/cheese-deployments.yaml
|
||||
```
|
||||
|
||||
Next we need to setup a service for each of the cheese pods.
|
||||
|
@ -390,7 +396,7 @@ spec:
|
|||
[examples/k8s/cheese-services.yaml](https://github.com/containous/traefik/tree/master/examples/k8s/cheese-services.yaml)
|
||||
|
||||
```shell
|
||||
kubectl apply -f examples/k8s/cheese-services.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/cheese-services.yaml
|
||||
```
|
||||
|
||||
Now we can submit an ingress for the cheese websites.
|
||||
|
@ -431,7 +437,7 @@ spec:
|
|||
> Notice that we list each hostname, and add a backend service.
|
||||
|
||||
```shell
|
||||
kubectl apply -f examples/k8s/cheese-ingress.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/cheese-ingress.yaml
|
||||
```
|
||||
|
||||
Now visit the [Træfik dashboard](http://traefik-ui.minikube/) and you should
|
||||
|
@ -491,7 +497,7 @@ spec:
|
|||
> the containers from the previous example without modification.
|
||||
|
||||
```shell
|
||||
kubectl apply -f examples/k8s/cheeses-ingress.yaml
|
||||
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/cheeses-ingress.yaml
|
||||
```
|
||||
|
||||
```shell
|
||||
|
|
96
docs/user-guide/marathon.md
Normal file
96
docs/user-guide/marathon.md
Normal file
|
@ -0,0 +1,96 @@
|
|||
|
||||
# Marathon
|
||||
|
||||
This guide explains how to integrate Marathon and operate the cluster in a reliable way from Traefik's standpoint.
|
||||
|
||||
# Host detection
|
||||
|
||||
Marathon offers multiple ways to run (Docker-containerized) applications, the most popular ones being
|
||||
|
||||
- BRIDGE-networked containers with dynamic high ports exposed
|
||||
- HOST-networked containers with host machine ports
|
||||
- containers with dedicated IP addresses ([IP-per-task](https://mesosphere.github.io/marathon/docs/ip-per-task.html)).
|
||||
|
||||
Traefik tries to detect the configured mode and route traffic to the right IP addresses. It is possible to force using task hosts with the `forceTaskHostname` option.
|
||||
|
||||
Given the complexity of the subject, it is possible that the heuristic fails. Apart from filing an issue and waiting for the feature request / bug report to get addressed, one workaround for such situations is to customize the Marathon template file to the individual needs. (Note that this does _not_ require rebuilding Traefik but only to point the `filename` configuration parameter to a customized version of the `marathon.tmpl` file on Traefik startup.)
|
||||
|
||||
# Port detection
|
||||
|
||||
Traefik also attempts to determine the right port (which is a [non-trivial matter in Marathon](https://mesosphere.github.io/marathon/docs/ports.html)). Following is the order by which Traefik tries to identify the port (the first one that yields a positive result will be used):
|
||||
|
||||
1. A arbitrary port specified through the `traefik.port` label.
|
||||
1. The task port (possibly indexed through the `traefik.portIndex` label, otherwise the first one).
|
||||
1. The port from the application's `portDefinitions` field (possibly indexed through the `traefik.portIndex` label, otherwise the first one).
|
||||
1. The port from the application's `ipAddressPerTask` field (possibly indexed through the `traefik.portIndex` label, otherwise the first one).
|
||||
|
||||
# Achieving high availability
|
||||
|
||||
## Scenarios
|
||||
|
||||
There are three scenarios where the availability of a Marathon application could be impaired along with the risk of losing or failing requests:
|
||||
|
||||
- During the startup phase when Traefik already routes requests to the backend even though it has not completed its bootstrapping process yet.
|
||||
- During the shutdown phase when Traefik still routes requests to the backend while the backend is already terminating.
|
||||
- During a failure of the application when Traefik has not yet identified the backend as being erroneous.
|
||||
|
||||
The first two scenarios are common with every rolling upgrade of an application (i.e., a new version release or configuration update).
|
||||
|
||||
The following sub-sections describe how to resolve or mitigate each scenario.
|
||||
|
||||
### Startup
|
||||
|
||||
In general, it is possible to define [readiness checks](https://mesosphere.github.io/marathon/docs/readiness-checks.html) (available since Marathon version 1.1) per application and have Marathon take these into account during the startup phase. The idea is that each application provides an HTTP endpoint that Marathon queries periodically during an ongoing deployment in order to mark the associated readiness check result as successful if and only if the endpoint returns a response within the configured HTTP code range. As long as the check keeps failing, Marathon will not proceed with the deployment (within the configured upgrade stategy bounds).
|
||||
|
||||
Unfortunately, Traefik does not respect the result of the readiness check yet. Support is expected to land in a not-too-distant future release of Traefik, however, as being tracked by [issue 1559](https://github.com/containous/traefik/issues/1559).
|
||||
|
||||
A current mitigation strategy is to enable [retries](http://docs.traefik.io/toml/#retry-configuration) and make sure that a sufficient number of healthy application tasks exist so that one retry will likely hit one of those. Apart from its probabilistic nature, the workaround comes at the price of increased latency.
|
||||
|
||||
### Shutdown
|
||||
|
||||
It is possible to install a [termination handler](https://mesosphere.github.io/marathon/docs/health-checks.html) (available since Marathon version 1.3) with each application whose responsibility it is to delay the shutdown process long enough until the backend has been taken out of load-balancing rotation with reasonable confidence (i.e., Traefik has received an update from the Marathon event bus, recomputes the available Marathon backends, and applies the new configuration). Specifically, each termination handler should install a signal handler listening for a SIGTERM signal and implement the following steps on signal reception:
|
||||
|
||||
1. Disable Keep-Alive HTTP connections.
|
||||
1. Keep accepting HTTP requests for a certain period of time.
|
||||
1. Stop accepting new connections.
|
||||
1. Finish serving any in-flight requests.
|
||||
1. Shut down.
|
||||
|
||||
Traefik already ignores Marathon tasks whose state does not match `TASK_RUNNING`; since terminating tasks transition into the `TASK_KILLING` and eventually `TASK_KILLED` state, there is nothing further that needs to be done on Traefik's end.
|
||||
|
||||
How long HTTP requests should continue to be accepted in step 2 depends on how long Traefik needs to receive and process the Marathon configuration update. Under regular operational conditions, it should be on the order of seconds, with 10 seconds possibly being a good default value.
|
||||
|
||||
Again, configuring Traefik to do retries (as discussed in the previous section) can serve as a decent workaround strategy. Paired with termination handlers, they would cover for those cases where either the termination sequence or Traefik cannot complete their part of the orchestration process in time.
|
||||
|
||||
### Failure
|
||||
|
||||
A failing application always happens unexpectedly, and hence, it is very difficult or even impossible to rule out the adversal effects categorically. Failure reasons vary broadly and could stretch from unacceptable slowness, a task crash, or a network split.
|
||||
|
||||
There are two mitigaton efforts:
|
||||
|
||||
1. Configure [Marathon health checks](https://mesosphere.github.io/marathon/docs/health-checks.html) on each application.
|
||||
1. Configure Traefik health checks (possibly via the `traefik.backend.healthcheck.*` labels) and make sure they probe with proper frequency.
|
||||
|
||||
The Marathon health check makes sure that applications once deemed dysfunctional are being rescheduled to different slaves. However, they might take a while to get triggered and the follow-up processes to complete. For that reason, the Treafik health check provides an additional check that responds more rapidly and does not require a configuration reload to happen. Additionally, it protects from cases that the Marathon health check may not be able to cover, such as a network split.
|
||||
|
||||
## (Non-)Alternatives
|
||||
|
||||
There are a few alternatives of varying quality that are frequently asked for. The remaining section is going to explore them along with a benefit/cost trade-off.
|
||||
|
||||
### Reusing Marathon health checks
|
||||
|
||||
It may seem obvious to reuse the Marathon health checks as a signal to Traefik whether an application should be taken into load-balancing rotation or not.
|
||||
|
||||
Apart from the increased latency a failing health check may have, a major problem with this is is that Marathon does not persist the health check results. Consequently, if a master re-election occurs in the Marathon clusters, all health check results will revert to the _unknown_ state, effectively causing all applications inside the cluster to become unavailable and leading to a complete cluster failure. Re-elections do not only happen during regular maintenance work (often requiring rolling upgrades of the Marathon nodes) but also when the Marathon leader fails spontaneously). As such, there is no way to handle this situation deterministically.
|
||||
|
||||
Finally, Marathon health checks are not mandatory (the default is to use the task state as reported by Mesos), so requiring them for Traefik would raise the entry barrier for Marathon users.
|
||||
|
||||
Traefik used to use the health check results but moved away from it as [users reported the dramatic consequences](https://github.com/containous/traefik/issues/653).
|
||||
|
||||
### Draining
|
||||
|
||||
Another common approach is to let a proxy drain backends that are supposed to shut down. That is, once a backend is supposed to shut down, Traefik would stop forwarding requests.
|
||||
|
||||
On the plus side, this would not require any modifications to the application in question. However, implementing this fully within Traefik seems like a non-trivial undertaking. Additionally, the approach is less flexible compared to a custom termination handler since only the latter allows for the implementation of custom termination sequences that go beyond simple request draining (e.g., persisting a snapshot state to disk prior to terminating).
|
||||
|
||||
The feature is currently not implemented; a request for draining in general is at [issue 41](https://github.com/containous/traefik/issues/41).
|
37
examples/k8s/traefik-rbac.yaml
Normal file
37
examples/k8s/traefik-rbac.yaml
Normal file
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- services
|
||||
- endpoints
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: traefik-ingress-controller
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
|
@ -1,87 +0,0 @@
|
|||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- services
|
||||
- endpoints
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- extensions
|
||||
resources:
|
||||
- ingresses
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: traefik-ingress-controller
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Deployment
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
name: traefik-ingress-lb
|
||||
spec:
|
||||
serviceAccountName: traefik-ingress-controller
|
||||
terminationGracePeriodSeconds: 60
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- image: traefik
|
||||
name: traefik-ingress-lb
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 30Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 20Mi
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
hostPort: 80
|
||||
- name: admin
|
||||
containerPort: 8081
|
||||
args:
|
||||
- -d
|
||||
- --web
|
||||
- --web.address=:8081
|
||||
- --kubernetes
|
|
@ -1,5 +1,11 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Deployment
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
namespace: kube-system
|
||||
---
|
||||
kind: DaemonSet
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
name: traefik-ingress-controller
|
||||
|
@ -7,16 +13,13 @@ metadata:
|
|||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: traefik-ingress-lb
|
||||
name: traefik-ingress-lb
|
||||
spec:
|
||||
serviceAccountName: traefik-ingress-controller
|
||||
terminationGracePeriodSeconds: 60
|
||||
hostNetwork: true
|
||||
containers:
|
||||
|
@ -35,6 +38,8 @@ spec:
|
|||
hostPort: 80
|
||||
- name: admin
|
||||
containerPort: 8081
|
||||
securityContext:
|
||||
privileged: true
|
||||
args:
|
||||
- -d
|
||||
- --web
|
||||
|
|
|
@ -7,6 +7,7 @@ import (
|
|||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
|
@ -55,6 +56,13 @@ type logInfoResponseWriter struct {
|
|||
// NewLogger returns a new Logger instance.
|
||||
func NewLogger(file string) *Logger {
|
||||
if len(file) > 0 {
|
||||
dir := filepath.Dir(file)
|
||||
|
||||
err := os.MkdirAll(dir, 0755)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to create log path %s: %s", dir, err)
|
||||
}
|
||||
|
||||
fi, err := os.OpenFile(file, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
|
||||
if err != nil {
|
||||
log.Error("Error opening file", err)
|
||||
|
|
|
@ -8,7 +8,6 @@ import (
|
|||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/containous/traefik/middlewares/accesslog"
|
||||
|
@ -20,8 +19,7 @@ type logtestResponseWriter struct{}
|
|||
|
||||
var (
|
||||
logger *Logger
|
||||
logfileName = "traefikTestLogger.log"
|
||||
logfilePath string
|
||||
logfileNameSuffix = "/traefik/logger/test.log"
|
||||
helloWorld = "Hello, World"
|
||||
testBackendName = "http://127.0.0.1/testBackend"
|
||||
testFrontendName = "testFrontend"
|
||||
|
@ -41,14 +39,21 @@ var (
|
|||
)
|
||||
|
||||
func TestLogger(t *testing.T) {
|
||||
if runtime.GOOS == "windows" {
|
||||
logfilePath = filepath.Join(os.Getenv("TEMP"), logfileName)
|
||||
} else {
|
||||
logfilePath = filepath.Join("/tmp", logfileName)
|
||||
tmp, err := ioutil.TempDir("", "testlogger")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create temp dir: %s", err)
|
||||
}
|
||||
defer os.RemoveAll(tmp)
|
||||
|
||||
logfilePath := filepath.Join(tmp, logfileNameSuffix)
|
||||
|
||||
logger = NewLogger(logfilePath)
|
||||
defer cleanup()
|
||||
defer logger.Close()
|
||||
|
||||
if _, err := os.Stat(logfilePath); os.IsNotExist(err) {
|
||||
t.Fatalf("logger should create %s", logfilePath)
|
||||
}
|
||||
|
||||
SetBackend2FrontendMap(&testBackend2FrontendMap)
|
||||
|
||||
r := &http.Request{
|
||||
|
@ -96,11 +101,6 @@ func TestLogger(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func cleanup() {
|
||||
logger.Close()
|
||||
os.Remove(logfilePath)
|
||||
}
|
||||
|
||||
func printLogdata(logdata []byte) string {
|
||||
return fmt.Sprintf(
|
||||
"\nExpected: %s\n"+
|
||||
|
|
|
@ -51,6 +51,7 @@ pages:
|
|||
- 'Swarm cluster': 'user-guide/swarm.md'
|
||||
- 'Swarm mode cluster': 'user-guide/swarm-mode.md'
|
||||
- 'Kubernetes': 'user-guide/kubernetes.md'
|
||||
- 'Marathon': 'user-guide/marathon.md'
|
||||
- 'Key-value store configuration': 'user-guide/kv-config.md'
|
||||
- 'Clustering/HA': 'user-guide/cluster.md'
|
||||
- Benchmarks: benchmarks.md
|
||||
|
|
Loading…
Reference in a new issue