From 88b7ea3de6495e6bfc1001b499b547fbd53355ed Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Tue, 2 Jul 2019 10:54:11 +0200 Subject: [PATCH] serve: rename all to all-base excluding executor since the executor are usually run separately from the other "base" components, make this explicit removing "all" and adding an "all-base" virtual component that will start all the components except the executor. --- cmd/agola/cmd/serve.go | 6 +++--- examples/kubernetes/simple/agola.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/agola/cmd/serve.go b/cmd/agola/cmd/serve.go index e94d2ad..471aa76 100644 --- a/cmd/agola/cmd/serve.go +++ b/cmd/agola/cmd/serve.go @@ -41,7 +41,7 @@ var ( ) var componentsNames = []string{ - "all", + "all-base", "gateway", "scheduler", "notification", @@ -75,7 +75,7 @@ func init() { flags := cmdServe.PersistentFlags() flags.StringVar(&serveOpts.config, "config", "./config.yml", "config file path") - flags.StringSliceVar(&serveOpts.components, "components", []string{}, `list of components to start (specify "all" to start all components)`) + flags.StringSliceVar(&serveOpts.components, "components", []string{}, `list of components to start. Specify "all-base" to start all base components (excluding the executor).`) flags.BoolVar(&serveOpts.embeddedEtcd, "embedded-etcd", false, "start and use an embedded etcd, only for testing purpose") flags.StringVar(&serveOpts.embeddedEtcdDataDir, "embedded-etcd-data-dir", "/tmp/agola/etcd", "embedded etcd data dir, only for testing purpose") @@ -112,7 +112,7 @@ func embeddedEtcd(ctx context.Context) error { } func isComponentEnabled(name string) bool { - if util.StringInSlice(serveOpts.components, "all") { + if util.StringInSlice(serveOpts.components, "all-base") && name != "executor" { return true } return util.StringInSlice(serveOpts.components, name) diff --git a/examples/kubernetes/simple/agola.yml b/examples/kubernetes/simple/agola.yml index 8ecd20f..9e9526a 100644 --- a/examples/kubernetes/simple/agola.yml +++ b/examples/kubernetes/simple/agola.yml @@ -160,7 +160,7 @@ spec: - "--config" - /mnt/agola/config/config.yml - "--components" - - all + - all-base,executor env: ports: - containerPort: 8000