Run canary config server separate from controller (#2617)
* add canary config server * remove the canary config code from the controller * remove port exposure for canary config
This commit is contained in:
@@ -29,6 +29,7 @@ import (
|
||||
|
||||
"github.com/fission/fission/cmd/fission-bundle/mqtrigger"
|
||||
"github.com/fission/fission/pkg/buildermgr"
|
||||
"github.com/fission/fission/pkg/canaryconfigmgr"
|
||||
"github.com/fission/fission/pkg/controller"
|
||||
"github.com/fission/fission/pkg/executor"
|
||||
"github.com/fission/fission/pkg/info"
|
||||
@@ -53,6 +54,10 @@ func runController(ctx context.Context, logger *zap.Logger, port int) {
|
||||
controller.Start(ctx, logger, port, false)
|
||||
}
|
||||
|
||||
func runCanaryConfigServer(ctx context.Context, logger *zap.Logger) error {
|
||||
return canaryconfigmgr.StartCanaryServer(ctx, logger, false)
|
||||
}
|
||||
|
||||
func runRouter(ctx context.Context, logger *zap.Logger, port int, executorUrl string) {
|
||||
router.Start(ctx, logger, port, executorUrl)
|
||||
}
|
||||
@@ -173,6 +178,7 @@ Use it to start one or more of the fission servers:
|
||||
|
||||
Usage:
|
||||
fission-bundle --controllerPort=<port>
|
||||
fission-bundle --canaryConfig
|
||||
fission-bundle --routerPort=<port> [--executorUrl=<url>]
|
||||
fission-bundle --executorPort=<port> [--namespace=<namespace>] [--fission-namespace=<namespace>]
|
||||
fission-bundle --kubewatcher [--routerUrl=<url>]
|
||||
@@ -186,6 +192,7 @@ Usage:
|
||||
fission-bundle --version
|
||||
Options:
|
||||
--controllerPort=<port> Port that the controller should listen on.
|
||||
--canaryConfig Start canary config server.
|
||||
--webhookPort=<port> Port that the webhook should listen on.
|
||||
--routerPort=<port> Port that the router should listen on.
|
||||
--executorPort=<port> Port that the executor should listen on.
|
||||
@@ -246,6 +253,14 @@ Options:
|
||||
return
|
||||
}
|
||||
|
||||
if arguments["--canaryConfig"] == true {
|
||||
err := runCanaryConfigServer(ctx, logger)
|
||||
if err != nil {
|
||||
logger.Error("canary config server exited with error: ", zap.Error(err))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if arguments["--routerPort"] != nil {
|
||||
port := getPort(logger, arguments["--routerPort"])
|
||||
runRouter(ctx, logger, port, executorUrl)
|
||||
|
||||
Reference in New Issue
Block a user