prometheus operator v0.93.1

ThanosRuler.spec.remoteWrite[].oauth2.tlsConfig.keySecret.spec

spec defines the specification of the desired behavior of the ThanosRuler cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

67 fields
ThanosRuler.spec.remoteWrite[].oauth2.tlsConfig.keySecret.spec fields and descriptions
Field / TypeDescription
object[]

additionalArgs defines how to add additional arguments for the ThanosRuler container. It is intended for e.g. activating hidden flags which are not supported by the dedicated configuration options yet. The arguments are passed as-is to the ThanosRuler container which may cause issues if they are invalid or not supported by the given ThanosRuler version. In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when providing an invalid argument the reconciliation will fail and an error will be logged.

object

affinity defines when specified, the pod's scheduling constraints.

string[]

alertDropLabels defines the label names which should be dropped in Thanos Ruler alerts. The replica label `thanos_ruler_replica` will always be dropped from the alerts.

alertQueryUrl
string

alertQueryUrl defines how Thanos Ruler will set in the 'Source' field of all alerts. Maps to the '--alert.query-url' CLI arg.

alertRelabelConfigFile
string

alertRelabelConfigFile defines the path to the alert relabeling configuration file. Alert relabel configuration must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs The operator performs no validation of the configuration file. This field takes precedence over `alertRelabelConfig`.

object

alertRelabelConfigs defines the alert relabeling in Thanos Ruler. Alert relabel configuration must have the form as specified in the official Prometheus documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs The operator performs no validation of the configuration. `alertRelabelConfigFile` takes precedence over this field.

  • x-kubernetes-map-type: "atomic"
object

alertmanagersConfig defines the list of Alertmanager endpoints to send alerts to. The configuration format is defined at https://thanos.io/tip/components/rule.md/#alertmanager. It requires Thanos >= v0.10.0. The operator performs no validation of the configuration. This field takes precedence over `alertmanagersUrl`.

  • x-kubernetes-map-type: "atomic"
string[]

alertmanagersUrl defines the list of Alertmanager endpoints to send alerts to. For Thanos >= v0.10.0, it is recommended to use `alertmanagersConfig` instead. `alertmanagersConfig` takes precedence over this field.

object[]

containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to the Pods or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch. The names of containers managed by the operator are: * `thanos-ruler` * `config-reloader` Overriding containers which are managed by the operator require careful testing, especially when upgrading to a new version of the operator.

object

dnsConfig defines Defines the DNS configuration for the pods.

dnsPolicy
string

dnsPolicy defines the DNS policy for the pods.

  • enum: ["ClusterFirstWithHostNet","ClusterFirst","Default","None"]
string[]

enableFeatures defines how to setup Thanos Ruler feature flags. By default, no features are enabled. Enabling features which are disabled by default is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice. For more information see https://thanos.io/tip/components/rule.md/ It requires Thanos >= 0.39.0.

  • x-kubernetes-list-type: "set"
enableServiceLinks
boolean

enableServiceLinks defines whether information about services should be injected into pod's environment variables

enforcedNamespaceLabel
string

enforcedNamespaceLabel enforces adding a namespace label of origin for each alert and metric that is user created. The label value will always be the namespace of the object that is being created.

evaluationInterval
string

evaluationInterval defines the interval between consecutive evaluations.

  • default: "15s"
  • pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
object[]

excludedFromEnforcement defines the list of references to PrometheusRule objects to be excluded from enforcing a namespace label of origin. Applies only if enforcedNamespaceLabel set to true.

externalPrefix
string

externalPrefix defines the Thanos Ruler instances will be available under. This is necessary to generate correct URLs. This is necessary if Thanos Ruler is not served from root of a DNS name.

object

grpcServerTlsConfig defines the gRPC server from which Thanos Querier reads recorded rule data. Note: Currently only the `minVersion`, `caFile`, `certFile`, `keyFile`, `cipherSuites` and `curves` fields are supported.

object[]

hostAliases defines pods' hostAliases configuration

  • x-kubernetes-list-map-keys: ["ip"]
  • x-kubernetes-list-type: "map"
hostUsers
boolean

hostUsers supports the user space in Kubernetes. More info: https://kubernetes.io/docs/tasks/configure-pod-container/user-namespaces/ The feature requires at least Kubernetes 1.28 with the `UserNamespacesSupport` feature gate enabled. Starting Kubernetes 1.33, the feature is enabled by default.

image
string

image defines Thanos container image URL.

imagePullPolicy
string

imagePullPolicy defines for the 'thanos', 'init-config-reloader' and 'config-reloader' containers. See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.

  • enum: ["","Always","Never","IfNotPresent"]
object[]

imagePullSecrets defines an optional list of references to secrets in the same namespace to use for pulling thanos images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod

object[]

initContainers allows injecting initContainers to the Pod definition. Those can be used to e.g. fetch secrets for injection into the configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/

map[string]string

labels defines the external label pairs of the ThanosRuler resource. A default replica label `thanos_ruler_replica` will be always added as a label with the value of the pod's name.

listenLocal
boolean

listenLocal defines the Thanos ruler listen on loopback, so that it does not bind against the Pod IP.

logFormat
string

logFormat for ThanosRuler to be configured with.

  • enum: ["","logfmt","json"]
logLevel
string

logLevel for ThanosRuler to be configured with.

  • enum: ["","debug","info","warn","error"]
minReadySeconds
integer

minReadySeconds defines the minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. If unset, pods will be considered available as soon as they are ready.

  • format: int32
  • minimum: 0
map[string]string

nodeSelector defines which Nodes the Pods are scheduled on.

object

objectStorageConfig defines the configuration format is defined at https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage The operator performs no validation of the configuration. `objectStorageConfigFile` takes precedence over this field.

  • x-kubernetes-map-type: "atomic"
objectStorageConfigFile
string

objectStorageConfigFile defines the path of the object storage configuration file. The configuration format is defined at https://thanos.io/tip/thanos/storage.md/#configuring-access-to-object-storage The operator performs no validation of the configuration file. This field takes precedence over `objectStorageConfig`.

paused
boolean

paused defines when a ThanosRuler deployment is paused, no actions except for deletion will be performed on the underlying objects.

podManagementPolicy
string

podManagementPolicy defines the policy for creating/deleting pods when scaling up and down. Unlike the default StatefulSet behavior, the default policy is `Parallel` to avoid manual intervention in case a pod gets stuck during a rollout. Note that updating this value implies the recreation of the StatefulSet which incurs a service outage.

  • enum: ["OrderedReady","Parallel"]
object

podMetadata defines labels and annotations which are propagated to the ThanosRuler pods. The following items are reserved and cannot be overridden: * "app.kubernetes.io/name" label, set to "thanos-ruler". * "app.kubernetes.io/managed-by" label, set to "prometheus-operator". * "app.kubernetes.io/instance" label, set to the name of the ThanosRuler instance. * "thanos-ruler" label, set to the name of the ThanosRuler instance. * "kubectl.kubernetes.io/default-container" annotation, set to "thanos-ruler".

portName
string

portName defines the port name used for the pods and governing service. Defaults to `web`.

  • default: "web"
priorityClassName
string

priorityClassName defines the priority class assigned to the Pods

object[]

prometheusRulesExcludedFromEnforce defines a 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 Deprecated: use excludedFromEnforcement instead.

object

queryConfig defines the list of Thanos Query endpoints from which to query metrics. The configuration format is defined at https://thanos.io/tip/components/rule.md/#query-api It requires Thanos >= v0.11.0. The operator performs no validation of the configuration. This field takes precedence over `queryEndpoints`.

  • x-kubernetes-map-type: "atomic"
string[]

queryEndpoints defines the list of Thanos Query endpoints from which to query metrics. For Thanos >= v0.11.0, it is recommended to use `queryConfig` instead. `queryConfig` takes precedence over this field.

object[]

remoteWrite defines the list of remote write configurations. When the list isn't empty, the ruler is configured with stateless mode. It requires Thanos >= 0.24.0.

replicas
integer

replicas defines the number of thanos ruler instances to deploy.

  • format: int32
resendDelay
string

resendDelay defines the minimum amount of time to wait before resending an alert to Alertmanager.

  • pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
object

resources defines the resource requirements for single Pods. If not provided, no requests/limits will be set

retention
string

retention defines the time duration ThanosRuler shall retain data for. Default is '24h', and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)` (milliseconds seconds minutes hours days weeks years). The field has no effect when remote-write is configured since the Ruler operates in stateless mode.

  • default: "24h"
  • pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
routePrefix
string

routePrefix defines the route prefix ThanosRuler registers HTTP handlers for. This allows thanos UI to be served on a sub-path.

ruleConcurrentEval
integer

ruleConcurrentEval defines how many rules can be evaluated concurrently. It requires Thanos >= v0.37.0.

  • format: int32
  • minimum: 1
ruleGracePeriod
string

ruleGracePeriod defines the minimum duration between alert and restored "for" state. This is maintained only for alerts with configured "for" time greater than grace period. It requires Thanos >= v0.30.0.

  • pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
object

ruleNamespaceSelector defines the namespaces to be selected for Rules discovery. If unspecified, only the same namespace as the ThanosRuler object is in is used.

  • x-kubernetes-map-type: "atomic"
ruleOutageTolerance
string

ruleOutageTolerance defines the max time to tolerate prometheus outage for restoring "for" state of alert. It requires Thanos >= v0.30.0.

  • pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
ruleQueryOffset
string

ruleQueryOffset defines the default rule group's query offset duration to use. It requires Thanos >= v0.38.0.

  • pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
object

ruleSelector defines the PrometheusRule objects to be selected for rule evaluation. An empty label selector matches all objects. A null label selector matches no objects.

  • x-kubernetes-map-type: "atomic"
schedulerName
string

schedulerName defines the scheduler to use for Pod scheduling. If not specified, the default scheduler is used.

  • minLength: 1
object

securityContext defines the pod-level security attributes and common container settings. This defaults to the default PodSecurityContext.

serviceAccountName
string

serviceAccountName defines the name of the ServiceAccount to use to run the Thanos Ruler Pods.

serviceName
string

serviceName defines the name of the service name used by the underlying StatefulSet(s) as the governing service. If defined, the Service must be created before the ThanosRuler resource in the same namespace and it must define a selector that matches the pod labels. If empty, the operator will create and manage a headless service named `thanos-ruler-operated` for ThanosRuler resources. When deploying multiple ThanosRuler resources in the same namespace, it is recommended to specify a different value for each. See https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id for more details.

  • minLength: 1
object

storage defines the specification of how storage shall be used.

terminationGracePeriodSeconds
integer

terminationGracePeriodSeconds defines the optional duration in seconds the pod needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down) which may lead to data corruption. Defaults to 120 seconds.

  • format: int64
  • minimum: 0
object[]

tolerations defines when specified, the pod's tolerations.

object[]

topologySpreadConstraints defines the pod's topology spread constraints.

object

tracingConfig defines the tracing configuration. The configuration format is defined at https://thanos.io/tip/thanos/tracing.md/#configuration This is an *experimental feature*, it may change in any upcoming release in a breaking way. The operator performs no validation of the configuration. `tracingConfigFile` takes precedence over this field.

  • x-kubernetes-map-type: "atomic"
tracingConfigFile
string

tracingConfigFile defines the path of the tracing configuration file. The configuration format is defined at https://thanos.io/tip/thanos/tracing.md/#configuration This is an *experimental feature*, it may change in any upcoming release in a breaking way. The operator performs no validation of the configuration file. This field takes precedence over `tracingConfig`.

object

updateStrategy indicates the strategy that will be employed to update Pods in the StatefulSet when a revision is made to statefulset's Pod Template. The default strategy is RollingUpdate.

  • x-kubernetes-validations: [{"message":"rollingUpdate requires type to be RollingUpdate","rule":"!(self.type != 'RollingUpdate' \u0026\u0026 has(self.rollingUpdate))"}]
version
string

version of Thanos to be deployed.

object[]

volumeMounts defines how the configuration of additional VolumeMounts on the output StatefulSet definition. VolumeMounts specified will be appended to other VolumeMounts in the ruler container, that are generated as a result of StorageSpec objects.

object[]

volumes defines how configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.

object

web defines the configuration of the ThanosRuler web server.