| 362 | } |
| 363 | |
| 364 | func NewSingleBinaryWithConfigFile(name string, configFile string, flags map[string]string, image string, httpPort, grpcPort int, otherPorts ...int) *CortexService { |
| 365 | if image == "" { |
| 366 | image = GetDefaultImage() |
| 367 | } |
| 368 | |
| 369 | return NewCortexService( |
| 370 | name, |
| 371 | image, |
| 372 | e2e.NewCommandWithoutEntrypoint("cortex", e2e.BuildArgs(e2e.MergeFlags(map[string]string{ |
| 373 | // Do not pass any extra default flags because the config should be drive by the config file. |
| 374 | "-target": "all", |
| 375 | "-log.level": "warn", |
| 376 | "-config.file": filepath.Join(e2e.ContainerSharedDir, configFile), |
| 377 | }, flags))...), |
| 378 | e2e.NewHTTPReadinessProbe(httpPort, "/ready", 200, 299), |
| 379 | httpPort, |
| 380 | grpcPort, |
| 381 | otherPorts..., |
| 382 | ) |
| 383 | } |
| 384 | |
| 385 | func NewAlertmanager(name string, flags map[string]string, image string) *CortexService { |
| 386 | if image == "" { |