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.
This commit is contained in:
parent
5c2bf8642f
commit
88b7ea3de6
|
@ -41,7 +41,7 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
var componentsNames = []string{
|
var componentsNames = []string{
|
||||||
"all",
|
"all-base",
|
||||||
"gateway",
|
"gateway",
|
||||||
"scheduler",
|
"scheduler",
|
||||||
"notification",
|
"notification",
|
||||||
|
@ -75,7 +75,7 @@ func init() {
|
||||||
flags := cmdServe.PersistentFlags()
|
flags := cmdServe.PersistentFlags()
|
||||||
|
|
||||||
flags.StringVar(&serveOpts.config, "config", "./config.yml", "config file path")
|
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.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")
|
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 {
|
func isComponentEnabled(name string) bool {
|
||||||
if util.StringInSlice(serveOpts.components, "all") {
|
if util.StringInSlice(serveOpts.components, "all-base") && name != "executor" {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return util.StringInSlice(serveOpts.components, name)
|
return util.StringInSlice(serveOpts.components, name)
|
||||||
|
|
|
@ -160,7 +160,7 @@ spec:
|
||||||
- "--config"
|
- "--config"
|
||||||
- /mnt/agola/config/config.yml
|
- /mnt/agola/config/config.yml
|
||||||
- "--components"
|
- "--components"
|
||||||
- all
|
- all-base,executor
|
||||||
env:
|
env:
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
|
|
Loading…
Reference in New Issue