diff --git a/pkg/ring/lifecycler.go b/pkg/ring/lifecycler.go index e75abdef41..914e1f0853 100644 --- a/pkg/ring/lifecycler.go +++ b/pkg/ring/lifecycler.go @@ -68,6 +68,12 @@ func (cfg *LifecyclerConfig) RegisterFlags(f *flag.FlagSet) { func (cfg *LifecyclerConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) { cfg.RingConfig.RegisterFlagsWithPrefix(prefix, f) + // In order to keep backwards compatibility all of these need to be prefixed + // with "ingester." + if prefix == "" { + prefix = "ingester." + } + f.IntVar(&cfg.NumTokens, prefix+"num-tokens", 128, "Number of tokens for each ingester.") f.DurationVar(&cfg.HeartbeatPeriod, prefix+"heartbeat-period", 5*time.Second, "Period at which to heartbeat to consul.") f.DurationVar(&cfg.JoinAfter, prefix+"join-after", 0*time.Second, "Period to wait for a claim from another member; will join automatically after this.")