diff --git a/.travis.yml b/.travis.yml index adcc5e2c8..a1ae99059 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ env: - secure: btt4r13t09gQlHb6gYrvGC2yGCMMHfnp1Mz1RQedc4Mpf/FfT8aE6xmK2a2i9CCvskjrP0t/BFaS4yxIURjnFRn+ugQIEa0pLspB9UJArW/vgOSpIWM9/OQ/fg8z5XuMxN6Md4DL1/iLypMNSageA1x0TRdt89+D1N1dALpg5XRCXLFbC84TLi0gjlFuib9ibPKzEhLT+anCRJ6iZMzeupDSoaCVbAtJMoDvXw4+4AcRZ1+k4MybBLyCib5boaEOt4pTT88mz4Kk0YaMwPVJyg9Qv36VqyUcPS09Yd95LuyVQ4+tZt8Y1ccbIzULsK+sLM3hLCzxlmlpN3dQBlZJiiRtQde0mgGAKyC0P0A1XjuDTywcsa5edB+fTk1Dsewz9xZ9V0NmMz8t+UNZnaSsAPga9i86jULbXUUwMVSzVRc+Xgx02liB/8qI1xYC9FM6ilStt7rn7mF0k3KbiWhcptgeXjO6Lah9FjEKd5w4MXsdUSTi/86rQaLo+kj+XdaTrXCTulKHyRyQEUj+8V1w0oVz7pcGjePHd7y5oU9ByifVQy6sytuFBfRZvugM5bKHo+i0pcWvixrZS42DrzwxZJsspANOvqSe5ifVbvOkfUppQdCBIwptxV5N1b49XPKU3W/w34QJ8xGmKp3TFA7WwVCztriFHjPgiRpB3EG99Bg= - REPO: $TRAVIS_REPO_SLUG - VERSION: $TRAVIS_TAG + - CODENAME: reblochon matrix: - DOCKER_VERSION=1.9.1 - DOCKER_VERSION=1.10.1 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..668f585da --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,107 @@ +# Change Log + +## [v1.0.0](https://github.com/containous/traefik/tree/v1.0.0) (2016-07-05) +[Full Changelog](https://github.com/containous/traefik/compare/v1.0.0-rc3...v1.0.0) + +**Fixed bugs:** + +- Enable to define empty TLS option by flag for Let's Encrypt [\#488](https://github.com/containous/traefik/issues/488) +- \[Docker\] No IP in backend in host networking mode [\#487](https://github.com/containous/traefik/issues/487) +- Response is compressed when not requested [\#485](https://github.com/containous/traefik/issues/485) +- loadConfig modifies configuration causing same config check to fail [\#480](https://github.com/containous/traefik/issues/480) + +**Closed issues:** + +- svg logo [\#482](https://github.com/containous/traefik/issues/482) +- etcd tries to connect with TLS even with --etcd.tls=false [\#456](https://github.com/containous/traefik/issues/456) +- Zookeeper - KV connection error: Failed to test KV store connection [\#455](https://github.com/containous/traefik/issues/455) +- "Not Found" api response needed instead of 404 [\#454](https://github.com/containous/traefik/issues/454) +- domain label doesn't work on docker [\#447](https://github.com/containous/traefik/issues/447) +- Any chance of a windows release? [\#425](https://github.com/containous/traefik/issues/425) + +**Merged pull requests:** + +- Fix windows builds [\#495](https://github.com/containous/traefik/pull/495) ([emilevauge](https://github.com/emilevauge)) +- Fix host Docker network [\#494](https://github.com/containous/traefik/pull/494) ([emilevauge](https://github.com/emilevauge)) +- Fix empty tls flag [\#493](https://github.com/containous/traefik/pull/493) ([emilevauge](https://github.com/emilevauge)) +- Fix webui proxying [\#492](https://github.com/containous/traefik/pull/492) ([emilevauge](https://github.com/emilevauge)) +- Fix default weight in server.LoadConfig [\#491](https://github.com/containous/traefik/pull/491) ([emilevauge](https://github.com/emilevauge)) +- Fix retry headers, simplify ResponseRecorder [\#490](https://github.com/containous/traefik/pull/490) ([emilevauge](https://github.com/emilevauge)) + +## [v1.0.0-rc3](https://github.com/containous/traefik/tree/v1.0.0-rc3) (2016-06-23) +[Full Changelog](https://github.com/containous/traefik/compare/v1.0.0-rc2...v1.0.0-rc3) + +**Implemented enhancements:** + +- support more than one rule to Docker backend [\#419](https://github.com/containous/traefik/issues/419) + +**Fixed bugs:** + +- consulCatalog issue when serviceName contains a dot [\#475](https://github.com/containous/traefik/issues/475) +- Issue with empty responses [\#463](https://github.com/containous/traefik/issues/463) +- Severe memory leak in beta.470 and beyond crashes Traefik server [\#462](https://github.com/containous/traefik/issues/462) +- Marathon that starts with a space causes parsing errors. [\#459](https://github.com/containous/traefik/issues/459) +- A frontend route without a rule \(or empty rule\) causes a crash when traefik starts [\#453](https://github.com/containous/traefik/issues/453) +- container dropped out when connecting to Docker Swarm [\#442](https://github.com/containous/traefik/issues/442) +- Traefik setting Accept-Encoding: gzip on requests \(Traefik may also be broken with chunked responses\) [\#421](https://github.com/containous/traefik/issues/421) + +**Closed issues:** + +- HTTP headers case gets modified [\#466](https://github.com/containous/traefik/issues/466) +- File frontend \> Marathon Backend [\#465](https://github.com/containous/traefik/issues/465) +- Websocket: Unable to hijack the connection [\#452](https://github.com/containous/traefik/issues/452) +- kubernetes: Received event spamming? [\#449](https://github.com/containous/traefik/issues/449) +- kubernetes: backends not updated when i scale replication controller? [\#448](https://github.com/containous/traefik/issues/448) +- Add href link on frontend [\#436](https://github.com/containous/traefik/issues/436) +- Multiple Domains Rule [\#430](https://github.com/containous/traefik/issues/430) + +**Merged pull requests:** + +- Disable constraints in doc until 1.1 [\#479](https://github.com/containous/traefik/pull/479) ([emilevauge](https://github.com/emilevauge)) +- Sort nodes before creating consul catalog config [\#478](https://github.com/containous/traefik/pull/478) ([keis](https://github.com/keis)) +- Fix spamming events in listenProviders [\#477](https://github.com/containous/traefik/pull/477) ([emilevauge](https://github.com/emilevauge)) +- Fix empty responses [\#476](https://github.com/containous/traefik/pull/476) ([emilevauge](https://github.com/emilevauge)) +- Fix acme renew [\#472](https://github.com/containous/traefik/pull/472) ([emilevauge](https://github.com/emilevauge)) +- Fix typo in error message. [\#471](https://github.com/containous/traefik/pull/471) ([KevinBusse](https://github.com/KevinBusse)) +- Fix errors load config [\#470](https://github.com/containous/traefik/pull/470) ([emilevauge](https://github.com/emilevauge)) +- Typo: Replace French words by English ones [\#469](https://github.com/containous/traefik/pull/469) ([kumy](https://github.com/kumy)) +- Fix marathon TLS/basic auth [\#468](https://github.com/containous/traefik/pull/468) ([emilevauge](https://github.com/emilevauge)) +- Fix memory leak in listenProviders [\#464](https://github.com/containous/traefik/pull/464) ([emilevauge](https://github.com/emilevauge)) +- Fix websocket connection Hijack [\#460](https://github.com/containous/traefik/pull/460) ([emilevauge](https://github.com/emilevauge)) +- Fix default KV configuration [\#450](https://github.com/containous/traefik/pull/450) ([emilevauge](https://github.com/emilevauge)) +- Fix panic if listContainers fails… [\#443](https://github.com/containous/traefik/pull/443) ([vdemeester](https://github.com/vdemeester)) +- mount acme folder instead of file [\#441](https://github.com/containous/traefik/pull/441) ([NicolasGeraud](https://github.com/NicolasGeraud)) +- feat\(constraints\): Supports constraints for docker backend [\#438](https://github.com/containous/traefik/pull/438) ([samber](https://github.com/samber)) + +## [v1.0.0-rc2](https://github.com/containous/traefik/tree/v1.0.0-rc2) (2016-06-07) +[Full Changelog](https://github.com/containous/traefik/compare/v1.0.0-rc1...v1.0.0-rc2) + +**Implemented enhancements:** + +- Add @samber to maintainers [\#440](https://github.com/containous/traefik/pull/440) ([emilevauge](https://github.com/emilevauge)) + +**Fixed bugs:** + +- Panic on help [\#429](https://github.com/containous/traefik/issues/429) +- Bad default values in configuration [\#427](https://github.com/containous/traefik/issues/427) + +**Closed issues:** + +- Traefik doesn't listen on IPv4 ports [\#434](https://github.com/containous/traefik/issues/434) +- Not listening on port 80 [\#432](https://github.com/containous/traefik/issues/432) +- docs need updating for new frontend rules format [\#423](https://github.com/containous/traefik/issues/423) +- Does traefik supports for Mac? \(For devlelopment\) [\#417](https://github.com/containous/traefik/issues/417) + +**Merged pull requests:** + +- Allow multiple rules [\#435](https://github.com/containous/traefik/pull/435) ([fclaeys](https://github.com/fclaeys)) +- Add routes priorities [\#433](https://github.com/containous/traefik/pull/433) ([emilevauge](https://github.com/emilevauge)) +- Fix default configuration [\#428](https://github.com/containous/traefik/pull/428) ([emilevauge](https://github.com/emilevauge)) +- Fix marathon groups subdomain [\#426](https://github.com/containous/traefik/pull/426) ([emilevauge](https://github.com/emilevauge)) +- Fix travis tag check [\#422](https://github.com/containous/traefik/pull/422) ([emilevauge](https://github.com/emilevauge)) +- log info about TOML configuration file using [\#420](https://github.com/containous/traefik/pull/420) ([cocap10](https://github.com/cocap10)) +- Doc about skipping some integration tests with '-check.f ConsulCatalogSuite' [\#418](https://github.com/containous/traefik/pull/418) ([samber](https://github.com/samber)) + + + +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/Makefile b/Makefile index 8ca374210..7ddb7564d 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ TRAEFIK_ENVS := \ -e OS_PLATFORM_ARG \ -e TESTFLAGS \ -e VERBOSE \ - -e VERSION + -e VERSION \ + -e CODENAME SRCS = $(shell git ls-files '*.go' | grep -v '^external/') diff --git a/README.md b/README.md index e8d3c383c..32ba9a40a 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Run it and forget it! - Websocket support - HTTP/2 support - Retry request if network error -- [Let's Encrypt](https://letsencrypt.org) support (Automatic HTTPS) +- [Let's Encrypt](https://letsencrypt.org) support (Automatic HTTPS with renewal) ## Demo @@ -145,9 +145,12 @@ software products. Founded in 2014, Asteris creates next-generation infrastructure software for the modern datacenter. Asteris writes software that makes it easy for companies to implement continuous delivery and realtime data pipelines. We support the HashiCorp stack, along with Kubernetes, Apache Mesos, Spark and Kafka. We're core committers on mantl.io, consul-cli and mesos-consul. ## Maintainers + - Emile Vauge [@emilevauge](https://github.com/emilevauge) - Vincent Demeester [@vdemeester](https://github.com/vdemeester) - Samuel Berthe [@samber](https://github.com/samber) +- Russell Clare [@Russell-IO](https://github.com/Russell-IO) +- Ed Robinson [@errm](https://github.com/errm) ## Credits diff --git a/docs/basics.md b/docs/basics.md index 5ac82ff7b..fca49afec 100644 --- a/docs/basics.md +++ b/docs/basics.md @@ -90,13 +90,52 @@ Here is an example of frontends definition: rule = "Host: localhost, {subdomain:[a-z]+}.localhost" [frontends.frontend3] backend = "backend2" + [frontends.frontend3.routes.test_1] rule = "Host: test3.localhost;Path:/test" ``` - Three frontends are defined: `frontend1`, `frontend2` and `frontend3` - `frontend1` will forward the traffic to the `backend2` if the rule `Host: test.localhost, test2.localhost` is matched - `frontend2` will forward the traffic to the `backend1` if the rule `Host: localhost, {subdomain:[a-z]+}.localhost` is matched (forwarding client `Host` header to the backend) -- `frontend3` will forward the traffic to the `backend2` if the rules `Host: test3.localhost` and `Path:/test` are matched +- `frontend3` will forward the traffic to the `backend2` if the rules `Host: test3.localhost` **and** `Path:/test` are matched + +### Combining multiple rules + +As seen in the previous example, you can combine multiple rules. +In TOML file, you can use multiple routes: + +```toml + [frontends.frontend3] + backend = "backend2" + [frontends.frontend3.routes.test_1] + rule = "Host: test3.localhost" + [frontends.frontend3.routes.test_2] + rule = "Host: Path:/test" +``` + +Here `frontend3` will forward the traffic to the `backend2` if the rules `Host: test3.localhost` **and** `Path:/test` are matched. +You can also use the notation using a `;` separator: + +```toml + [frontends.frontend3] + backend = "backend2" + [frontends.frontend3.routes.test_1] + rule = "Host: test3.localhost;Path:/test" +``` + +Finally, you can create a rule to bind multiple domains or Path to a frontend, using the `,` separator: + +```toml + [frontends.frontend2] + [frontends.frontend2.routes.test_1] + rule = "Host: test1.localhost,Host: test2.localhost" + [frontends.frontend3] + backend = "backend2" + [frontends.frontend3.routes.test_1] + rule = "Path:/test1,/test2" +``` + +### Priorities By default, routes will be sorted using rules length (to avoid path overlap): `PathPrefix:/12345` will be matched before `PathPrefix:/1234` that will be matched before `PathPrefix:/1`. diff --git a/script/binary b/script/binary index fe69c9d56..9ed9225a5 100755 --- a/script/binary +++ b/script/binary @@ -17,9 +17,13 @@ if [ -z "$VERSION" ]; then VERSION=$(git rev-parse HEAD) fi +if [ -z "$CODENAME" ]; then + CODENAME=cheddar +fi + if [ -z "$DATE" ]; then DATE=$(date -u '+%Y-%m-%d_%I:%M:%S%p') fi # Build binaries -CGO_ENABLED=0 GOGC=off go build $FLAGS -ldflags "-s -w -X main.Version=$VERSION -X main.BuildDate=$DATE" -a -installsuffix nocgo -o dist/traefik . +CGO_ENABLED=0 GOGC=off go build $FLAGS -ldflags "-s -w -X main.Version=$VERSION -X main.Codename=$CODENAME -X main.BuildDate=$DATE" -a -installsuffix nocgo -o dist/traefik . diff --git a/script/crossbinary b/script/crossbinary index 055dc5210..11537f8e0 100755 --- a/script/crossbinary +++ b/script/crossbinary @@ -10,6 +10,10 @@ if [ -z "$VERSION" ]; then VERSION=$(git rev-parse HEAD) fi +if [ -z "$CODENAME" ]; then + CODENAME=cheddar +fi + if [ -z "$DATE" ]; then DATE=$(date -u '+%Y-%m-%d_%I:%M:%S%p') fi @@ -23,7 +27,7 @@ OS_ARCH_ARG=(386 amd64) for OS in ${OS_PLATFORM_ARG[@]}; do for ARCH in ${OS_ARCH_ARG[@]}; do echo "Building binary for $OS/$ARCH..." - GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 go build -ldflags "-s -w -X main.Version=$VERSION -X main.BuildDate=$DATE" -o "dist/traefik_$OS-$ARCH" . + GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 go build -ldflags "-s -w -X main.Version=$VERSION -X main.Codename=$CODENAME -X main.BuildDate=$DATE" -o "dist/traefik_$OS-$ARCH" . done done @@ -34,6 +38,6 @@ OS_ARCH_ARG=(arm arm64) for OS in ${OS_PLATFORM_ARG[@]}; do for ARCH in ${OS_ARCH_ARG[@]}; do echo "Building binary for $OS/$ARCH..." - GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 go build -ldflags "-s -w -X main.Version=$VERSION -X main.BuildDate=$DATE" -o "dist/traefik_$OS-$ARCH" . + GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 go build -ldflags "-s -w -X main.Version=$VERSION -X main.Codename=$CODENAME -X main.BuildDate=$DATE" -o "dist/traefik_$OS-$ARCH" . done done \ No newline at end of file diff --git a/traefik.go b/traefik.go index f870cffd4..a471796ff 100644 --- a/traefik.go +++ b/traefik.go @@ -20,6 +20,7 @@ import ( ) var versionTemplate = `Version: {{.Version}} +Codename: {{.Codename}} Go version: {{.GoVersion}} Built: {{.BuildTime}} OS/Arch: {{.Os}}/{{.Arch}}` @@ -57,12 +58,14 @@ Complete documentation is available at https://traefik.io`, v := struct { Version string + Codename string GoVersion string BuildTime string Os string Arch string }{ Version: Version, + Codename: Codename, GoVersion: runtime.Version(), BuildTime: BuildDate, Os: runtime.GOOS, diff --git a/version.go b/version.go index 10f7cdb3c..73892b697 100644 --- a/version.go +++ b/version.go @@ -3,6 +3,8 @@ package main var ( // Version holds the current version of traefik. Version = "dev" + // Codename holds the current version codename of traefik. + Codename = "cheddar" // beta cheese // BuildDate holds the build date of traefik. BuildDate = "I don't remember exactly" )