You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,7 @@
49
49
*[CHANGE] Increased default `-<prefix>.redis.timeout` from `100ms` to `500ms`. #3301
50
50
*[FEATURE] Added support for shuffle-sharding queriers in the query-frontend. When configured (`-frontend.max-queriers-per-tenant` globally, or using per-tenant limit `max_queriers_per_tenant`), each tenants's requests will be handled by different set of queriers. #3113#3257
51
51
*[FEATURE] Query-frontend: added `compression` config to support results cache with compression. #3217
52
+
*[ENHANCEMENT] Allow to specify multiple comma-separated Cortex services to `-target` CLI option (or its respective YAML config option). For example, `-target=all,compactor` can be used to start Cortex single-binary with compactor as well. #3275
52
53
*[ENHANCEMENT] Expose additional HTTP configs for the S3 backend client. New flag are listed below: #3244
Copy file name to clipboardExpand all lines: pkg/cortex/cortex.go
+22-9Lines changed: 22 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -71,10 +71,10 @@ import (
71
71
72
72
// Config is the root config for Cortex.
73
73
typeConfigstruct {
74
-
Targetstring`yaml:"target"`
75
-
AuthEnabledbool`yaml:"auth_enabled"`
76
-
PrintConfigbool`yaml:"-"`
77
-
HTTPPrefixstring`yaml:"http_prefix"`
74
+
Targetflagext.StringSliceCSV`yaml:"target"`
75
+
AuthEnabledbool`yaml:"auth_enabled"`
76
+
PrintConfigbool`yaml:"-"`
77
+
HTTPPrefixstring`yaml:"http_prefix"`
78
78
79
79
API api.Config`yaml:"api"`
80
80
Server server.Config`yaml:"server"`
@@ -109,7 +109,14 @@ type Config struct {
109
109
func (c*Config) RegisterFlags(f*flag.FlagSet) {
110
110
c.Server.MetricsNamespace="cortex"
111
111
c.Server.ExcludeRequestInLog=true
112
-
f.StringVar(&c.Target, "target", All, "The Cortex module to run. Use \"-modules\" command line flag to get a list of available modules, and to see which modules are included in \"All\".")
112
+
113
+
// Set the default module list to 'all'
114
+
c.Target= []string{All}
115
+
116
+
f.Var(&c.Target, "target", "Comma-separated list of Cortex modules to load. "+
117
+
"The alias 'all' can be used in the list to load a number of core modules and will enable single-binary mode. "+
118
+
"Use '-modules' command line flag to get a list of available modules, and to see which modules are included in 'all'.")
119
+
113
120
f.BoolVar(&c.AuthEnabled, "auth.enabled", true, "Set to false to disable auth.")
114
121
f.BoolVar(&c.PrintConfig, "print.config", false, "Print the config and exit.")
115
122
f.StringVar(&c.HTTPPrefix, "http.prefix", "/api/prom", "HTTP path prefix for Cortex API.")
level.Warn(util.Logger).Log("msg", "Worker address is empty in single binary mode. Attempting automatic worker configuration. If queries are unresponsive consider configuring the worker explicitly.", "address", address)
0 commit comments