Skip to content

Commit

Permalink
make rulerAPIPath configurable
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Willies <[email protected]>
  • Loading branch information
janwillies committed Oct 6, 2023
1 parent 58aa76d commit 9dcf1d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type Config struct {
TLS tls.ClientConfig
UseLegacyRoutes bool `yaml:"use_legacy_routes"`
AuthToken string `yaml:"auth_token"`
RulerAPIPath string `yaml:"rulerAPIPath"`
}

// CortexClient is used to get and load rules into a cortex ruler
Expand Down Expand Up @@ -82,6 +83,9 @@ func New(cfg Config) (*CortexClient, error) {
}

path := rulerAPIPath
if cfg.RulerAPIPath != "" {
path = cfg.RulerAPIPath
}
if cfg.UseLegacyRoutes {
path = legacyAPIPath
}
Expand Down

0 comments on commit 9dcf1d0

Please sign in to comment.