1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 11:48:53 +00:00

[thanos-sidecar] Add minTime arg

This commit is contained in:
Amr Hanafi (MAHDI)) 2020-05-28 12:27:59 -07:00
parent b0ab8afe43
commit cb8c56e373
6 changed files with 20 additions and 1 deletions
Documentation
bundle.yaml
example/prometheus-operator-crd
jsonnet/prometheus-operator
pkg
apis/monitoring/v1
prometheus

View file

@ -696,6 +696,7 @@ ThanosSpec defines parameters for a Prometheus server within a Thanos deployment
| grpcServerTlsConfig | GRPCServerTLSConfig configures the gRPC server from which Thanos Querier reads recorded rule data. Note: Currently only the CAFile, CertFile, and KeyFile fields are supported. Maps to the '--grpc-server-tls-*' CLI args. | *[TLSConfig](#tlsconfig) | false |
| logLevel | LogLevel for Thanos sidecar to be configured with. | string | false |
| logFormat | LogFormat for Thanos sidecar to be configured with. | string | false |
| minTime | MinTime for Thanos sidecar to be configured with. | string | false |
[Back to TOC](#table-of-contents)

View file

@ -9711,6 +9711,12 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
retention:
description: MinTime for Thanos sidecar to be configured with.
Option can be a constant time in RFC3339 format or time duration
relative to current time, such as -1d or 2h45m. Valid duration
units are ms, s, m, h, d, w, y.
type: string
sha:
description: SHA of Thanos container image to be deployed. Defaults
to the value of `version`. Similar to a tag, but the SHA explicitly

View file

@ -4824,6 +4824,12 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
retention:
description: MinTime for Thanos sidecar to be configured with.
Option can be a constant time in RFC3339 format or time duration
relative to current time, such as -1d or 2h45m. Valid duration
units are ms, s, m, h, d, w, y.
type: string
sha:
description: SHA of Thanos container image to be deployed. Defaults
to the value of `version`. Similar to a tag, but the SHA explicitly

File diff suppressed because one or more lines are too long

View file

@ -481,6 +481,8 @@ type ThanosSpec struct {
LogLevel string `json:"logLevel,omitempty"`
// LogFormat for Thanos sidecar to be configured with.
LogFormat string `json:"logFormat,omitempty"`
// MinTime for Thanos sidecar to be configured with. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y.
MinTime string `json:"retention,omitempty"`
}
// RemoteWriteSpec defines the remote_write configuration for prometheus.

View file

@ -820,6 +820,10 @@ func makeStatefulSetSpec(p monitoringv1.Prometheus, c *Config, ruleConfigMapName
} else if p.Spec.LogFormat != "" {
container.Args = append(container.Args, "--log.format="+p.Spec.LogFormat)
}
if p.Spec.Thanos.MinTime != "" {
container.Args = append(container.Args, "--min-time="+p.Spec.Thanos.MinTime)
}
additionalContainers = append(additionalContainers, container)
}
if disableCompaction {