| 244 | } |
| 245 | |
| 246 | func NewQueryFrontendWithConfigFile(name, configFile string, flags map[string]string, image string) *CortexService { |
| 247 | if configFile != "" { |
| 248 | flags["-config.file"] = filepath.Join(e2e.ContainerSharedDir, configFile) |
| 249 | } |
| 250 | |
| 251 | if image == "" { |
| 252 | image = GetDefaultImage() |
| 253 | } |
| 254 | |
| 255 | return NewCortexService( |
| 256 | name, |
| 257 | image, |
| 258 | e2e.NewCommandWithoutEntrypoint("cortex", e2e.BuildArgs(e2e.MergeFlags(map[string]string{ |
| 259 | "-target": "query-frontend", |
| 260 | "-log.level": "warn", |
| 261 | // Quickly detect query-scheduler when running it. |
| 262 | "-frontend.scheduler-dns-lookup-period": "1s", |
| 263 | }, flags))...), |
| 264 | e2e.NewHTTPReadinessProbe(httpPort, "/ready", 200, 299), |
| 265 | httpPort, |
| 266 | grpcPort, |
| 267 | ) |
| 268 | } |
| 269 | |
| 270 | func NewQueryScheduler(name string, flags map[string]string, image string) *CortexService { |
| 271 | return NewQuerySchedulerWithConfigFile(name, "", flags, image) |