Istio integration (#421)

This the very first step for fission to integrate with Istio, which is an open platform to connect, manage, and secure microservices. With Istio, users are able to monitor functions usage and trace requests latency through dashboards. For more information, please visit http://fission.io/docs/
This commit is contained in:
Ta-Ching Chen
2018-02-28 04:09:32 +08:00
committed by GitHub
parent b9a559af2f
commit 23942fdf7d
29 changed files with 731 additions and 98 deletions
+18
View File
@@ -21,6 +21,7 @@ import (
"net/http"
"os"
"runtime/debug"
"strconv"
"strings"
"github.com/gorilla/handlers"
@@ -41,6 +42,8 @@ type (
storageServiceUrl string
builderManagerUrl string
workflowApiUrl string
functionNamespace string
useIstio bool
}
logDBConfig struct {
@@ -74,6 +77,21 @@ func MakeAPI() (*API, error) {
api.workflowApiUrl = "http://workflows-apiserver"
}
fnNs := os.Getenv("FISSION_FUNCTION_NAMESPACE")
if len(fnNs) > 0 {
api.functionNamespace = fnNs
} else {
api.functionNamespace = "fission-function"
}
if len(os.Getenv("ENABLE_ISTIO")) > 0 {
istio, err := strconv.ParseBool(os.Getenv("ENABLE_ISTIO"))
if err != nil {
log.Println("Failed to parse ENABLE_ISTIO")
}
api.useIstio = istio
}
return api, err
}