From 91ce78da46b6b218381305854e363ef4da67dad6 Mon Sep 17 00:00:00 2001 From: Timo Reimann Date: Mon, 3 Jul 2017 10:06:32 +0200 Subject: [PATCH 1/3] [k8s] Tell glog to log everything into STDERR. Logging errors into a file inside a minimalistic container might not be possible, and glog bails out with an exit code > 0 if it fails. --- provider/kubernetes/kubernetes.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/provider/kubernetes/kubernetes.go b/provider/kubernetes/kubernetes.go index ca0b6b5f4..a0168cba7 100644 --- a/provider/kubernetes/kubernetes.go +++ b/provider/kubernetes/kubernetes.go @@ -4,6 +4,7 @@ import ( "bufio" "bytes" "errors" + "flag" "fmt" "os" "reflect" @@ -62,6 +63,12 @@ func (p *Provider) newK8sClient() (Client, error) { // Provide allows the k8s provider to provide configurations to traefik // using the given configuration channel. func (p *Provider) Provide(configurationChan chan<- types.ConfigMessage, pool *safe.Pool, constraints types.Constraints) error { + // Tell glog (used by client-go) to log into STDERR. Otherwise, we risk + // certain kinds of API errors getting logged into a directory not + // available in a `FROM scratch` Docker container, causing glog to abort + // hard with an exit code > 0. + flag.Set("logtostderr", "true") + k8sClient, err := p.newK8sClient() if err != nil { return err From 4892b2b0da034f5383d6e59e9b27641049e173e3 Mon Sep 17 00:00:00 2001 From: Timo Reimann Date: Wed, 5 Jul 2017 21:30:18 +0200 Subject: [PATCH 2/3] [kubernetes] Undo the Secrets controller sync wait. When Secrets permissions have not been granted (which is likely to be the case for users not needing the basic auth feature), the watch on the Secrets API will never yield a response, thereby causing the controller to never sync successfully, and in turn causing the check for all controller synchronizations to fail consistently. Thus, no event will ever be handled. --- provider/kubernetes/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provider/kubernetes/client.go b/provider/kubernetes/client.go index 4ee9097d2..971efe033 100644 --- a/provider/kubernetes/client.go +++ b/provider/kubernetes/client.go @@ -263,7 +263,7 @@ func (c *clientImpl) WatchAll(labelSelector string, stopCh <-chan struct{}) (<-c // fireEvent checks if all controllers have synced before firing // Used after startup or a reconnect func (c *clientImpl) fireEvent(event interface{}, eventCh chan interface{}) { - if !c.ingController.HasSynced() || !c.svcController.HasSynced() || !c.epController.HasSynced() || !c.secController.HasSynced() { + if !c.ingController.HasSynced() || !c.svcController.HasSynced() || !c.epController.HasSynced() { return } eventHandlerFunc(eventCh, event) From 98b52d1f54799d732c1d8c466e3270642a89d880 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Thu, 6 Jul 2017 17:25:10 +0200 Subject: [PATCH 3/3] Prepare release v1.3.3 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ec971d38..dba24292f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [v1.3.3](https://github.com/containous/traefik/tree/v1.3.3) (2017-07-06) +[All Commits](https://github.com/containous/traefik/compare/v1.3.2...v1.3.3) + +**Bug fixes:** +- **[k8s]** Undo the Secrets controller sync wait. ([#1828](https://github.com/containous/traefik/pull/1828) by [timoreimann](https://github.com/timoreimann)) +- **[k8s]** Tell glog to log everything into STDERR. ([#1817](https://github.com/containous/traefik/pull/1817) by [timoreimann](https://github.com/timoreimann)) + ## [v1.3.2](https://github.com/containous/traefik/tree/v1.3.2) (2017-06-29) [All Commits](https://github.com/containous/traefik/compare/v1.3.1...v1.3.2)