Skip to content

Commit bab3d91

Browse files
committed
minor changes
Signed-off-by: 7h3-3mp7y-m4n <[email protected]>
1 parent b5b6c87 commit bab3d91

File tree

5 files changed

+6
-18
lines changed

5 files changed

+6
-18
lines changed

docs/configuration/config-file-reference.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,6 @@ Where default_value is the value to use if the environment variable is undefined
6868
# CLI flag: -http.prefix
6969
[http_prefix: <string> | default = "/api/prom"]
7070

71-
# Validation scheme for metric and label names.
72-
# Set to "utf8" to allow UTF-8 characters in metric and label names.
73-
# Set to "legacy" to enforce strict legacy-compatible name rules.
74-
# CLI flag: -name.validation_scheme
75-
[name_validation_scheme: <legacy | utf8> | default = "legacy"]
76-
7771
resource_monitor:
7872
# Comma-separated list of resources to monitor. Supported values are cpu and
7973
# heap, which tracks metrics from github.com/prometheus/procfs and
@@ -90,6 +84,11 @@ resource_monitor:
9084
# CLI flag: -resource-monitor.cpu-rate-interval
9185
[cpu_rate_interval: <duration> | default = 1m]
9286

87+
# Validation scheme for metric and label names. Set to utf8 to allow UTF-8
88+
# characters.
89+
# CLI flag: -name.validation-scheme
90+
[name_validation_scheme: <string> | default = "legacy"]
91+
9392
api:
9493
# Use GZIP compression for API responses. Some endpoints serve large YAML or
9594
# JSON blobs which can benefit from compression.

pkg/cortex/configinit/init.go

Lines changed: 0 additions & 8 deletions
This file was deleted.

pkg/cortex/cortex.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import (
3333
"github.com/cortexproject/cortex/pkg/configs"
3434
configAPI "github.com/cortexproject/cortex/pkg/configs/api"
3535
"github.com/cortexproject/cortex/pkg/configs/db"
36-
_ "github.com/cortexproject/cortex/pkg/cortex/configinit"
3736
"github.com/cortexproject/cortex/pkg/cortex/storage"
3837
"github.com/cortexproject/cortex/pkg/cortexpb"
3938
"github.com/cortexproject/cortex/pkg/distributor"
@@ -149,7 +148,7 @@ func (c *Config) RegisterFlags(f *flag.FlagSet) {
149148
f.BoolVar(&c.AuthEnabled, "auth.enabled", true, "Set to false to disable auth.")
150149
f.BoolVar(&c.PrintConfig, "print.config", false, "Print the config and exit.")
151150
f.StringVar(&c.HTTPPrefix, "http.prefix", "/api/prom", "HTTP path prefix for Cortex API.")
152-
f.StringVar(&c.NameValidationScheme, "name.validation_scheme", "legacy", "Validation scheme for metric and label names. Set to utf8 to allow UTF-8 characters.")
151+
f.StringVar(&c.NameValidationScheme, "name.validation-scheme", "legacy", "Validation scheme for metric and label names. Set to utf8 to allow UTF-8 characters.")
153152
c.API.RegisterFlags(f)
154153
c.registerServerFlagsWithChangedDefaultValues(f)
155154
c.Distributor.RegisterFlags(f)

pkg/distributor/distributor_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import (
3535
"google.golang.org/grpc/status"
3636

3737
promchunk "github.com/cortexproject/cortex/pkg/chunk/encoding"
38-
_ "github.com/cortexproject/cortex/pkg/cortex/configinit"
3938
"github.com/cortexproject/cortex/pkg/cortexpb"
4039
"github.com/cortexproject/cortex/pkg/ha"
4140
"github.com/cortexproject/cortex/pkg/ingester"

pkg/util/validation/validate_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/stretchr/testify/require"
1717
"github.com/weaveworks/common/httpgrpc"
1818

19-
_ "github.com/cortexproject/cortex/pkg/cortex/configinit"
2019
"github.com/cortexproject/cortex/pkg/cortexpb"
2120
util_log "github.com/cortexproject/cortex/pkg/util/log"
2221
)

0 commit comments

Comments
 (0)