Refactor logging to remove logger, use fluentd with kubernetes filter (#380)

Remove the `logger` container from the logging daemonset. 

Remove the outgoing call from the poolmgr to the logger.  Use Fluentd's Kubernetes filter to add function name and UID to influx metadata.  

This means fluentd now figures out when to start collecting function logs on its own, without being informed by poolmgr.  This is great for other execution strategies, and for autoscaling, where fission isn't in direct control of function pod creation.

Also adds an integration test to make sure logging keeps working.
This commit is contained in:
prithviramesh
2017-11-14 18:08:57 -08:00
committed by Soam Vasani
parent 74e05ba3a1
commit 8b40ad0b33
13 changed files with 126 additions and 310 deletions
-12
View File
@@ -9,7 +9,6 @@ import (
"github.com/fission/fission/buildermgr"
"github.com/fission/fission/controller"
"github.com/fission/fission/kubewatcher"
"github.com/fission/fission/logger"
"github.com/fission/fission/mqtrigger"
"github.com/fission/fission/poolmgr"
"github.com/fission/fission/router"
@@ -41,11 +40,6 @@ func runKubeWatcher(routerUrl string) {
}
}
func runLogger() {
logger.Start()
log.Fatalf("Error: Logger exited.")
}
func runTimer(routerUrl string) {
err := timer.Start(routerUrl)
if err != nil {
@@ -122,7 +116,6 @@ Usage:
fission-bundle --kubewatcher [--routerUrl=<url>]
fission-bundle --storageServicePort=<port> --filePath=<filePath>
fission-bundle --builderMgrPort=<port> [--storageSvcUrl=<url>] [--envbuilder-namespace=<namespace>]
fission-bundle --logger
fission-bundle --timer [--routerUrl=<url>]
fission-bundle --mqt [--routerUrl=<url>]
Options:
@@ -138,7 +131,6 @@ Options:
--filePath=<filePath> Directory to store functions in.
--namespace=<namespace> Kubernetes namespace in which to run function containers. Defaults to 'fission-function'.
--kubewatcher Start Kubernetes events watcher.
--logger Start logger.
--timer Start Timer.
--mqt Start message queue trigger.
`
@@ -174,10 +166,6 @@ Options:
runKubeWatcher(routerUrl)
}
if arguments["--logger"] == true {
runLogger()
}
if arguments["--timer"] == true {
runTimer(routerUrl)
}