-
Notifications
You must be signed in to change notification settings - Fork 613
Add new fields to ThanosQuerierConfig #2835
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2381,6 +2381,35 @@ type TelemeterClientConfig struct { | |
| // At least one field must be specified; an empty thanosQuerierConfig object is not allowed. | ||
| // +kubebuilder:validation:MinProperties=1 | ||
| type ThanosQuerierConfig struct { | ||
| // logLevel defines the verbosity of logs emitted by Thanos Querier. | ||
| // logLevel is optional. | ||
| // Allowed values are Error, Warn, Info, and Debug. | ||
| // When set to Error, only errors will be logged. | ||
| // When set to Warn, both warnings and errors will be logged. | ||
| // When set to Info, general information, warnings, and errors will all be logged. | ||
| // When set to Debug, detailed debugging information will be logged. | ||
| // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. | ||
| // The current default value is `Info`. | ||
| // +optional | ||
| LogLevel LogLevel `json:"logLevel,omitempty"` | ||
| // enableRequestLogging controls whether all incoming HTTP requests are logged by Thanos Querier. | ||
| // enableRequestLogging is optional. | ||
| // Valid values are "Enabled" and "Disabled". | ||
| // When set to "Enabled", every request received by Thanos Querier is logged with method, path, and response status. | ||
| // When set to "Disabled", request logging is turned off. | ||
| // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. | ||
| // The current default value is "Disabled". | ||
| // +optional | ||
| EnableRequestLogging ThanosQuerierToggle `json:"enableRequestLogging,omitempty"` | ||
| // enableCORS controls whether Thanos Querier sets CORS headers allowing access from any origin. | ||
| // enableCORS is optional. | ||
| // Valid values are "Enabled" and "Disabled". | ||
| // When set to "Enabled", CORS headers are added to responses, allowing cross-origin requests from any domain. | ||
| // When set to "Disabled", no CORS headers are added. | ||
| // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. | ||
| // The current default value is "Disabled". | ||
| // +optional | ||
| EnableCORS ThanosQuerierToggle `json:"enableCORS,omitempty"` | ||
|
Comment on lines
+2404
to
+2412
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We try to avoid the usage of the terms "enabled" and "disabled" where possible because they tend to be just as ambiguous as a true/false boolean value. Also, What do you think of making this something like |
||
| // nodeSelector defines the nodes on which the Pods are scheduled. | ||
| // nodeSelector is optional. | ||
| // | ||
|
|
@@ -2449,6 +2478,18 @@ type ThanosQuerierConfig struct { | |
| TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` | ||
| } | ||
|
|
||
| // ThanosQuerierToggle is a string type for Thanos Querier feature toggles. | ||
| // Valid values are "Enabled" and "Disabled". | ||
| // +kubebuilder:validation:Enum=Enabled;Disabled | ||
| type ThanosQuerierToggle string | ||
|
|
||
| const ( | ||
| // ThanosQuerierToggleEnabled enables the feature. | ||
| ThanosQuerierToggleEnabled ThanosQuerierToggle = "Enabled" | ||
| // ThanosQuerierToggleDisabled disables the feature. | ||
| ThanosQuerierToggleDisabled ThanosQuerierToggle = "Disabled" | ||
| ) | ||
|
|
||
| // AuditProfile defines the audit log level for the Metrics Server. | ||
| // +kubebuilder:validation:Enum=None;Metadata;Request;RequestResponse | ||
| type AuditProfile string | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Looking at https://thanos.io/tip/thanos/logging.md/ it looks like HTTP request logging has the ability to be configured beyond just being turned on/off.
Do we anticipate needing to support the finer tuning that the thanos configuration options seem to allow?