(name, consulAddress, configFile string, flags map[string]string, image string)
| 298 | } |
| 299 | |
| 300 | func NewCompactorWithConfigFile(name, consulAddress, configFile string, flags map[string]string, image string) *CortexService { |
| 301 | if configFile != "" { |
| 302 | flags["-config.file"] = filepath.Join(e2e.ContainerSharedDir, configFile) |
| 303 | } |
| 304 | |
| 305 | if image == "" { |
| 306 | image = GetDefaultImage() |
| 307 | } |
| 308 | |
| 309 | return NewCortexService( |
| 310 | name, |
| 311 | image, |
| 312 | e2e.NewCommandWithoutEntrypoint("cortex", e2e.BuildArgs(e2e.MergeFlags(map[string]string{ |
| 313 | "-target": "compactor", |
| 314 | "-log.level": "warn", |
| 315 | // Store-gateway ring backend. |
| 316 | "-compactor.sharding-enabled": "true", |
| 317 | "-compactor.ring.store": "consul", |
| 318 | "-compactor.ring.consul.hostname": consulAddress, |
| 319 | // Startup quickly. |
| 320 | "-compactor.ring.wait-stability-min-duration": "0", |
| 321 | "-compactor.ring.wait-stability-max-duration": "0", |
| 322 | }, flags))...), |
| 323 | e2e.NewHTTPReadinessProbe(httpPort, "/ready", 200, 299), |
| 324 | httpPort, |
| 325 | grpcPort, |
| 326 | ) |
| 327 | } |
| 328 | |
| 329 | func NewSingleBinary(name string, flags map[string]string, image string, otherPorts ...int) *CortexService { |
| 330 | if image == "" { |
no test coverage detected