mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 11:48:53 +00:00
add allow-overlapping-blocks
Signed-off-by: yeya24 <yb532204897@gmail.com>
This commit is contained in:
parent
7cc71cbd2a
commit
7d2da4fa51
6 changed files with 19 additions and 1 deletions
|
@ -451,6 +451,7 @@ PrometheusSpec is a specification of the desired behavior of the Prometheus clus
|
|||
| prometheusRulesExcludedFromEnforce | PrometheusRulesExcludedFromEnforce - list of prometheus rules to be excluded from enforcing of adding namespace labels. Works only if enforcedNamespaceLabel set to true. Make sure both ruleNamespace and ruleName are set for each pair | [][PrometheusRuleExcludeConfig](#prometheusruleexcludeconfig) | false |
|
||||
| queryLogFile | QueryLogFile specifies the file to which PromQL queries are logged. Note that this location must be writable, and can be persisted using an attached volume. Alternatively, the location can be set to a stdout location such as `/dev/stdout` to log querie information to the default Prometheus log stream. This is only available in versions of Prometheus >= 2.16.0. For more details, see the Prometheus docs (https://prometheus.io/docs/guides/query-log/) | string | false |
|
||||
| enforcedSampleLimit | EnforcedSampleLimit defines global limit on number of scraped samples that will be accepted. This overrides any SampleLimit set per ServiceMonitor or/and PodMonitor. It is meant to be used by admins to enforce the SampleLimit to keep overall number of samples/series under the desired limit. Note that if SampleLimit is lower that value will be taken instead. | *uint64 | false |
|
||||
| allowOverlappingBlocks | AllowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus. This is still experimental in Prometheus so it may change in any upcoming release. | bool | false |
|
||||
|
||||
[Back to TOC](#table-of-contents)
|
||||
|
||||
|
|
|
@ -5789,6 +5789,11 @@ spec:
|
|||
required:
|
||||
- alertmanagers
|
||||
type: object
|
||||
allowOverlappingBlocks:
|
||||
description: AllowOverlappingBlocks enables vertical compaction and
|
||||
vertical query merge in Prometheus. This is still experimental in
|
||||
Prometheus so it may change in any upcoming release.
|
||||
type: boolean
|
||||
apiserverConfig:
|
||||
description: APIServerConfig allows specifying a host and auth methods
|
||||
to access apiserver. If left empty, Prometheus is assumed to run
|
||||
|
|
|
@ -902,6 +902,11 @@ spec:
|
|||
required:
|
||||
- alertmanagers
|
||||
type: object
|
||||
allowOverlappingBlocks:
|
||||
description: AllowOverlappingBlocks enables vertical compaction and
|
||||
vertical query merge in Prometheus. This is still experimental in
|
||||
Prometheus so it may change in any upcoming release.
|
||||
type: boolean
|
||||
apiserverConfig:
|
||||
description: APIServerConfig allows specifying a host and auth methods
|
||||
to access apiserver. If left empty, Prometheus is assumed to run
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -326,6 +326,9 @@ type PrometheusSpec struct {
|
|||
// the desired limit.
|
||||
// Note that if SampleLimit is lower that value will be taken instead.
|
||||
EnforcedSampleLimit *uint64 `json:"enforcedSampleLimit,omitempty"`
|
||||
// AllowOverlappingBlocks enables vertical compaction and vertical query merge in Prometheus.
|
||||
// This is still experimental in Prometheus so it may change in any upcoming release.
|
||||
AllowOverlappingBlocks bool `json:"allowOverlappingBlocks,omitempty"`
|
||||
}
|
||||
|
||||
// PrometheusRuleExcludeConfig enables users to configure excluded PrometheusRule names and their namespaces
|
||||
|
|
|
@ -431,6 +431,10 @@ func makeStatefulSetSpec(p monitoringv1.Prometheus, c *Config, ruleConfigMapName
|
|||
}
|
||||
}
|
||||
|
||||
if version.GTE(semver.MustParse("2.8.0")) && p.Spec.AllowOverlappingBlocks {
|
||||
promArgs = append(promArgs, "-storage.tsdb.allow-overlapping-blocks")
|
||||
}
|
||||
|
||||
var ports []v1.ContainerPort
|
||||
if p.Spec.ListenLocal {
|
||||
promArgs = append(promArgs, "-web.listen-address=127.0.0.1:9090")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue