| 423 | } |
| 424 | |
| 425 | func NewRuler(name string, consulAddress string, flags map[string]string, image string) *CortexService { |
| 426 | if image == "" { |
| 427 | image = GetDefaultImage() |
| 428 | } |
| 429 | |
| 430 | return NewCortexService( |
| 431 | name, |
| 432 | image, |
| 433 | e2e.NewCommandWithoutEntrypoint("cortex", e2e.BuildArgs(e2e.MergeFlags(map[string]string{ |
| 434 | "-target": "ruler", |
| 435 | "-log.level": "warn", |
| 436 | // Configure the ring backend |
| 437 | "-ring.store": "consul", |
| 438 | "-store-gateway.sharding-ring.store": "consul", |
| 439 | "-consul.hostname": consulAddress, |
| 440 | "-store-gateway.sharding-ring.consul.hostname": consulAddress, |
| 441 | // Store-gateway ring backend. |
| 442 | "-store-gateway.sharding-enabled": "true", |
| 443 | "-store-gateway.sharding-ring.replication-factor": "1", |
| 444 | }, flags))...), |
| 445 | e2e.NewHTTPReadinessProbe(httpPort, "/ready", 200, 299), |
| 446 | httpPort, |
| 447 | grpcPort, |
| 448 | ) |
| 449 | } |