From b9bd7461bd62e31054731e5f66899eddeadfcaba Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Mon, 17 Dec 2018 15:39:06 -0700 Subject: [PATCH] If disablecontrollers don't start global controllers --- build.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.go b/build.go index f015b6f1..73c1d911 100644 --- a/build.go +++ b/build.go @@ -101,7 +101,11 @@ func (c *Config) Build(ctx context.Context, opts *Options) (context.Context, *Se } } - return ctx, server, controller.SyncThenStart(ctx, c.Threadiness, starters...) + if !opts.DisableControllers { + err = controller.SyncThenStart(ctx, c.Threadiness, starters...) + } + + return ctx, server, err } func (c *Config) apiServer(ctx context.Context, r *Runtime) error {