-
Notifications
You must be signed in to change notification settings - Fork 825
feat: add configurable name validation scheme (legacy or utf8) #6890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: 7h3-3mp7y-m4n <[email protected]>
Signed-off-by: 7h3-3mp7y-m4n <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/cortexproject/cortex/blob/master/pkg/cortex/configinit/init.go
also needs to be removed. And please remove the places where the package is imported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also remove https://github.com/cortexproject/cortex/blob/master/pkg/cortex/configinit/init.go and its references.
Also fix lint then we are good to go!
@@ -146,7 +149,7 @@ func (c *Config) RegisterFlags(f *flag.FlagSet) { | |||
f.BoolVar(&c.AuthEnabled, "auth.enabled", true, "Set to false to disable auth.") | |||
f.BoolVar(&c.PrintConfig, "print.config", false, "Print the config and exit.") | |||
f.StringVar(&c.HTTPPrefix, "http.prefix", "/api/prom", "HTTP path prefix for Cortex API.") | |||
|
|||
f.StringVar(&c.NameValidationScheme, "name.validation_scheme", "legacy", "Validation scheme for metric and label names. Set to utf8 to allow UTF-8 characters.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flag name should be name.validation-scheme
as we use -
in the flag name and use _
in the config file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I'll make the changes :)
4f0a9a3
to
7da904b
Compare
I made a blunder, I'll raise a new PR with the changes, and I apologize for it ! |
What this PR does:
Adds name_validation_scheme as a YAML config field and -name.validation_scheme as a CLI flag to configure the metric and label name validation mode. Supports legacy (default) and UTF-8 options.
Which issue(s) this PR fixes:
Fixes #6702
Follow Up #6733
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]