(name string, store RingStore, address string, configFile string, flags map[string]string, image string)
| 128 | } |
| 129 | |
| 130 | func NewStoreGatewayWithConfigFile(name string, store RingStore, address string, configFile string, flags map[string]string, image string) *CortexService { |
| 131 | if configFile != "" { |
| 132 | flags["-config.file"] = filepath.Join(e2e.ContainerSharedDir, configFile) |
| 133 | } |
| 134 | |
| 135 | switch store { |
| 136 | case RingStoreConsul: |
| 137 | flags["-consul.hostname"] = address |
| 138 | flags["-store-gateway.sharding-ring.consul.hostname"] = address |
| 139 | case RingStoreEtcd: |
| 140 | flags["-etcd.endpoints"] = address |
| 141 | flags["-store-gateway.sharding-ring.etcd.endpoints"] = address |
| 142 | } |
| 143 | |
| 144 | if image == "" { |
| 145 | image = GetDefaultImage() |
| 146 | } |
| 147 | |
| 148 | return NewCortexService( |
| 149 | name, |
| 150 | image, |
| 151 | e2e.NewCommandWithoutEntrypoint("cortex", e2e.BuildArgs(e2e.MergeFlags(map[string]string{ |
| 152 | "-target": "store-gateway", |
| 153 | "-log.level": "warn", |
| 154 | // Store-gateway ring backend. |
| 155 | "-store-gateway.sharding-enabled": "true", |
| 156 | "-store-gateway.sharding-ring.store": string(store), |
| 157 | "-store-gateway.sharding-ring.replication-factor": "1", |
| 158 | // Startup quickly. |
| 159 | "-store-gateway.sharding-ring.wait-stability-min-duration": "0", |
| 160 | "-store-gateway.sharding-ring.wait-stability-max-duration": "0", |
| 161 | }, flags))...), |
| 162 | e2e.NewHTTPReadinessProbe(httpPort, "/ready", 200, 299), |
| 163 | httpPort, |
| 164 | grpcPort, |
| 165 | ) |
| 166 | } |
| 167 | |
| 168 | func NewIngester(name string, store RingStore, address string, flags map[string]string, image string) *CortexService { |
| 169 | return NewIngesterWithConfigFile(name, store, address, "", flags, image) |
no test coverage detected