v1alpha1

package
v0.0.0-...-365d84a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=monitoring.thanos.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "monitoring.thanos.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Additional

type Additional struct {
	// Additional arguments to pass to the Thanos components.
	// +kubebuilder:validation:Optional
	Args []string `json:"additionalArgs,omitempty"`
	// Additional containers to add to the Thanos components.
	// +kubebuilder:validation:Optional
	Containers []corev1.Container `json:"additionalContainers,omitempty"`
	// Additional volumes to add to the Thanos components.
	// +kubebuilder:validation:Optional
	Volumes []corev1.Volume `json:"additionalVolumes,omitempty"`
	// Additional volume mounts to add to the Thanos component container in a Deployment or StatefulSet
	// controlled by the operator.
	// +kubebuilder:validation:Optional
	VolumeMounts []corev1.VolumeMount `json:"additionalVolumeMounts,omitempty"`
	// Additional ports to expose on the Thanos component container in a Deployment or StatefulSet
	// controlled by the operator.
	// +kubebuilder:validation:Optional
	Ports []corev1.ContainerPort `json:"additionalPorts,omitempty"`
	// Additional environment variables to add to the Thanos component container in a Deployment or StatefulSet
	// controlled by the operator.
	// +kubebuilder:validation:Optional
	Env []corev1.EnvVar `json:"additionalEnv,omitempty"`
	// AdditionalServicePorts are additional ports to expose on the Service for the Thanos component.
	// +kubebuilder:validation:Optional
	ServicePorts []corev1.ServicePort `json:"additionalServicePorts,omitempty"`
}

Additional holds additional configuration for the Thanos components.

func (*Additional) DeepCopy

func (in *Additional) DeepCopy() *Additional

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Additional.

func (*Additional) DeepCopyInto

func (in *Additional) DeepCopyInto(out *Additional)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BlockConfig

type BlockConfig struct {
	// BlockDiscoveryStrategy is the discovery strategy to use for block discovery in storage.
	// +kubebuilder:default="concurrent"
	// +kubebuilder:validation:Enum=concurrent;recursive
	BlockDiscoveryStrategy BlockDiscoveryStrategy `json:"blockDiscoveryStrategy,omitempty"`
	// BlockFilesConcurrency is the number of goroutines to use when to use when
	// fetching/uploading block files from object storage.
	// +kubebuilder:default=1
	// +kubebuilder:validation:Optional
	BlockFilesConcurrency *int32 `json:"blockFilesConcurrency,omitempty"`
	// BlockMetaFetchConcurrency is the number of goroutines to use when fetching block metadata from object storage.
	// +kubebuilder:default=32
	// +kubebuilder:validation:Optional
	BlockMetaFetchConcurrency *int32 `json:"blockMetaFetchConcurrency,omitempty"`
	// BlockViewerGlobalSyncInterval for syncing the blocks between local and remote view for /global Block Viewer UI.
	// +kubebuilder:default="1m"
	// +kubebuilder:validation:Optional
	BlockViewerGlobalSyncInterval *Duration `json:"blockViewerGlobalSync,omitempty"`
	// BlockViewerGlobalSyncTimeout is the maximum time for syncing the blocks
	// between local and remote view for /global Block Viewer UI.
	// +kubebuilder:default="5m"
	// +kubebuilder:validation:Optional
	BlockViewerGlobalSyncTimeout *Duration `json:"blockViewerGlobalSyncTimeout,omitempty"`
}

BlockConfig defines settings for block handling.

func (*BlockConfig) DeepCopy

func (in *BlockConfig) DeepCopy() *BlockConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockConfig.

func (*BlockConfig) DeepCopyInto

func (in *BlockConfig) DeepCopyInto(out *BlockConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BlockDiscoveryStrategy

type BlockDiscoveryStrategy string

BlockDiscoveryStrategy represents the strategy to use for block discovery.

const (
	// BlockDiscoveryStrategyConcurrent means stores will concurrently issue one call
	// per directory to discover active blocks storage.
	BlockDiscoveryStrategyConcurrent BlockDiscoveryStrategy = "concurrent"
	// BlockDiscoveryStrategyRecursive means stores iterate through all objects in storage
	// recursively traversing into each directory.
	// This avoids N+1 calls at the expense of having slower bucket iterations.
	BlockDiscoveryStrategyRecursive BlockDiscoveryStrategy = "recursive"
)

type CacheConfig

type CacheConfig struct {
	// InMemoryCacheConfig is the configuration for the in-memory cache.
	// +kubebuilder:validation:Optional
	InMemoryCacheConfig *InMemoryCacheConfig `json:"inMemoryCacheConfig,omitempty"`
	// ExternalCacheConfig is the configuration for the external cache.
	// +kubebuilder:validation:Optional
	ExternalCacheConfig *corev1.SecretKeySelector `json:"externalCacheConfig,omitempty"`
}

CacheConfig is the configuration for the cache. If both InMemoryCacheConfig and ExternalCacheConfig are specified, the operator will prefer the ExternalCacheConfig. +kubebuilder:validation:Optional

func (*CacheConfig) DeepCopy

func (in *CacheConfig) DeepCopy() *CacheConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheConfig.

func (*CacheConfig) DeepCopyInto

func (in *CacheConfig) DeepCopyInto(out *CacheConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CommonFields

type CommonFields struct {
	// Version of Thanos to be deployed.
	// If not specified, the operator assumes the latest upstream version of
	// Thanos available at the time when the version of the operator was released.
	// +kubebuilder:validation:Optional
	Version *string `json:"version,omitempty"`
	// Container image to use for the Thanos components.
	// +kubebuilder:validation:Optional
	Image *string `json:"image,omitempty"`
	// Image pull policy for the Thanos containers.
	// See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details.
	// +kubebuilder:validation:Enum=Always;Never;IfNotPresent
	// +kubebuilder:default:=IfNotPresent
	// +kubebuilder:validation:Optional
	ImagePullPolicy *corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// An optional list of references to Secrets in the same namespace
	// to use for pulling images from registries.
	// See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
	// +kubebuilder:validation:Optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// ResourceRequirements for the Thanos component container.
	// +kubebuilder:validation:Optional
	ResourceRequirements *corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
	// Log level for Thanos.
	// +kubebuilder:validation:Enum=debug;info;warn;error
	// +kubebuilder:validation:Optional
	LogLevel *string `json:"logLevel,omitempty"`
	// Log format for Thanos.
	// +kubebuilder:validation:Enum=logfmt;json
	// +kubebuilder:default:=logfmt
	// +kubebuilder:validation:Optional
	LogFormat *string `json:"logFormat,omitempty"`
}

CommonFields are the options available to all Thanos components. These fields reflect runtime changes to managed StatefulSet and Deployment resources. +kubebuilder:validation:Optional +k8s:deepcopy-gen=true

func (*CommonFields) DeepCopy

func (in *CommonFields) DeepCopy() *CommonFields

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonFields.

func (*CommonFields) DeepCopyInto

func (in *CommonFields) DeepCopyInto(out *CommonFields)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompactConfig

type CompactConfig struct {
	// BlockFetchConcurrency is the number of goroutines to use when fetching blocks from object storage.
	// +kubebuilder:default=1
	// +kubebuilder:validation:Optional
	BlockFetchConcurrency *int32 `json:"blockFetchConcurrency,omitempty"`
	// CleanupInterval configures how often we should clean up partially uploaded blocks and blocks
	// that are marked for deletion.
	// Cleaning happens at the end of an iteration.
	// Setting this to 0s disables the cleanup.
	// +kubebuilder:default="5m"
	// +kubebuilder:validation:Optional
	CleanupInterval *Duration `json:"cleanupInterval,omitempty"`
	// ConsistencyDelay is the minimum age of fresh (non-compacted) blocks before they are being processed.
	// Malformed blocks older than the maximum of consistency-delay and 48h0m0s will be removed.
	// +kubebuilder:default="30m"
	// +kubebuilder:validation:Optional
	ConsistencyDelay *Duration `json:"blockConsistencyDelay,omitempty"`
}

func (*CompactConfig) DeepCopy

func (in *CompactConfig) DeepCopy() *CompactConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompactConfig.

func (*CompactConfig) DeepCopyInto

func (in *CompactConfig) DeepCopyInto(out *CompactConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DownsamplingConfig

type DownsamplingConfig struct {
	// Disable downsampling.
	// +kubebuilder:default=false
	Disable *bool `json:"downsamplingEnabled,omitempty"`
	// Concurrency is the number of goroutines to use when downsampling blocks.
	// +kubebuilder:default=1
	// +kubebuilder:validation:Optional
	Concurrency *int32 `json:"downsamplingConcurrency,omitempty"`
}

DownsamplingConfig defines the downsampling configuration for the compact component.

func (*DownsamplingConfig) DeepCopy

func (in *DownsamplingConfig) DeepCopy() *DownsamplingConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownsamplingConfig.

func (*DownsamplingConfig) DeepCopyInto

func (in *DownsamplingConfig) DeepCopyInto(out *DownsamplingConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Duration

type Duration string

Duration is a valid time duration that can be parsed by Prometheus model.ParseDuration() function. Supported units: y, w, d, h, m, s, ms Examples: `30s`, `1m`, `1h20m15s`, `15d` +kubebuilder:validation:Pattern:="^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$"

type ExternalLabelShardingConfig

type ExternalLabelShardingConfig struct {
	// ShardName is the name of the shard.
	// ShardName is used to identify the shard in the compact component.
	// +kubebuilder:validation:Required
	ShardName string `json:"shardName"`
	// Label is the external label to shard on.
	// +kubebuilder:validation:Required
	Label string `json:"label"`
	// Values are the values (as regular expressions) to shard on.
	Values []string `json:"values"`
}

ExternalLabelShardingConfig defines the sharding configuration based on explicit external labels and their values. The keys are the external labels to shard on and the values are the values (as regular expressions) to shard on. Each value will be a configured and deployed as a separate compact component. For example, if the 'label' is set to `tenant_id` with values `tenant-a` and `!tenant-a` two compact components will be deployed. The resulting compact StatefulSets will have an appropriate --selection.relabel-config flag set to the value of the external label sharding. And named such that:

	The first compact component will have the name {ThanosCompact.Name}-{shardName}-0 with the flag
    --selector.relabel-config=
       - source_labels:
         - tenant_id
         regex: 'tenant-a'
         action: keep

	The second compact component will have the name {ThanosCompact.Name}-{shardName}-1 with the flag
    --selector.relabel-config=
       - source_labels:
         - tenant_id
         regex: '!tenant-a'
         action: keep

func (*ExternalLabelShardingConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalLabelShardingConfig.

func (*ExternalLabelShardingConfig) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExternalLabels

type ExternalLabels map[string]string

ExternalLabels are the labels to add to the metrics. POD_NAME and POD_NAMESPACE are available via the downward API. +kubebuilder:validation:MinProperties=1 +kubebuilder:validation:Required https://thanos.io/tip/thanos/storage.md/#external-labels

func (ExternalLabels) DeepCopy

func (in ExternalLabels) DeepCopy() ExternalLabels

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalLabels.

func (ExternalLabels) DeepCopyInto

func (in ExternalLabels) DeepCopyInto(out *ExternalLabels)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FeatureGates

type FeatureGates struct {
	// ServiceMonitorConfig is the configuration for the ServiceMonitor.
	// This setting requires the feature gate for ServiceMonitor management to be enabled.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:={enable: true}
	ServiceMonitorConfig *ServiceMonitorConfig `json:"serviceMonitor,omitempty"`
	// PrometheusRuleEnabled enables the loading of PrometheusRules into the Thanos Ruler.
	// This setting is only applicable to ThanosRuler CRD, will be ignored for other components.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:=true
	PrometheusRuleEnabled *bool `json:"prometheusRuleEnabled,omitempty"`
}

FeatureGates holds the configuration for behaviour that is behind feature flags in the operator.

func (*FeatureGates) DeepCopy

func (in *FeatureGates) DeepCopy() *FeatureGates

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGates.

func (*FeatureGates) DeepCopyInto

func (in *FeatureGates) DeepCopyInto(out *FeatureGates)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InMemoryCacheConfig

type InMemoryCacheConfig struct {
	MaxSize     *StorageSize `json:"maxSize,omitempty"`
	MaxItemSize *StorageSize `json:"maxItemSize,omitempty"`
}

InMemoryCacheConfig is the configuration for the in-memory cache.

func (*InMemoryCacheConfig) DeepCopy

func (in *InMemoryCacheConfig) DeepCopy() *InMemoryCacheConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InMemoryCacheConfig.

func (*InMemoryCacheConfig) DeepCopyInto

func (in *InMemoryCacheConfig) DeepCopyInto(out *InMemoryCacheConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IngesterHashringSpec

type IngesterHashringSpec struct {
	// CommonFields are the options available to all Thanos components.
	// +kubebuilder:validation:Optional
	CommonFields `json:",inline"`
	// Name is the name of the hashring.
	// Name will be used to generate the names for the resources created for the hashring.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:Pattern=`^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
	Name string `json:"name"`
	// Labels are additional labels to add to the ingester components.
	// Labels set here will overwrite the labels inherited from the ThanosReceive object if they have the same key.
	// +kubebuilder:validation:Optional
	Labels map[string]string `json:"labels,omitempty"`
	// ExternalLabels to add to the ingesters tsdb blocks.
	// +kubebuilder:default={replica: "$(POD_NAME)"}
	// +kubebuilder:validation:Required
	ExternalLabels ExternalLabels `json:"externalLabels,omitempty"`
	// Replicas is the number of replicas/members of the hashring to add to the Thanos Receive StatefulSet.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	// +kubebuilder:validation:Required
	Replicas int32 `json:"replicas,omitempty"`
	// TSDB configuration for the ingestor.
	// +kubebuilder:validation:Required
	TSDBConfig TSDBConfig `json:"tsdbConfig,omitempty"`
	// ObjectStorageConfig is the secret that contains the object storage configuration for the hashring.
	// +kubebuilder:validation:Optional
	ObjectStorageConfig *ObjectStorageConfig `json:"objectStorageConfig,omitempty"`
	// StorageSize is the size of the storage to be used by the Thanos Receive StatefulSet.
	// +kubebuilder:validation:Required
	StorageSize StorageSize `json:"storageSize"`
	// Tenants is a list of tenants that should be matched by the hashring.
	// An empty list matches all tenants.
	// +kubebuilder:validation:Optional
	Tenants []string `json:"tenants,omitempty"`
	// TenantMatcherType is the type of tenant matching to use.
	// +kubebuilder:default:="exact"
	// +kubebuilder:validation:Enum=exact;glob
	TenantMatcherType string `json:"tenantMatcherType,omitempty"`
}

IngesterHashringSpec represents the configuration for a hashring to be used by the Thanos Receive StatefulSet.

func (*IngesterHashringSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngesterHashringSpec.

func (*IngesterHashringSpec) DeepCopyInto

func (in *IngesterHashringSpec) DeepCopyInto(out *IngesterHashringSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IngesterSpec

type IngesterSpec struct {
	// DefaultObjectStorageConfig is the secret that contains the object storage configuration for the ingest components.
	// Can be overridden by the ObjectStorageConfig in the IngesterHashringSpec per hashring.
	// +kubebuilder:validation:Required
	DefaultObjectStorageConfig ObjectStorageConfig `json:"defaultObjectStorageConfig,omitempty"`
	// Hashrings is a list of hashrings to route to.
	// +kubebuilder:validation:MaxItems=100
	// +kubebuilder:validation:Required
	// +listType=map
	// +listMapKey=name
	Hashrings []IngesterHashringSpec `json:"hashrings,omitempty"`
	// Additional configuration for the Thanos components. Allows you to add
	// additional args, containers, volumes, and volume mounts to Thanos Deployments,
	// and StatefulSets. Ideal to use for things like sidecars.
	// +kubebuilder:validation:Optional
	Additional `json:",inline"`
}

IngesterSpec represents the configuration for the ingestor

func (*IngesterSpec) DeepCopy

func (in *IngesterSpec) DeepCopy() *IngesterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngesterSpec.

func (*IngesterSpec) DeepCopyInto

func (in *IngesterSpec) DeepCopyInto(out *IngesterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ObjectStorageConfig

type ObjectStorageConfig corev1.SecretKeySelector

ObjectStorageConfig is the secret that contains the object storage configuration. The secret needs to be in the same namespace as the ReceiveHashring object. See https://thanos.io/tip/thanos/storage.md/#supported-clients for relevant documentation.

func (*ObjectStorageConfig) DeepCopy

func (in *ObjectStorageConfig) DeepCopy() *ObjectStorageConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectStorageConfig.

func (*ObjectStorageConfig) DeepCopyInto

func (in *ObjectStorageConfig) DeepCopyInto(out *ObjectStorageConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ObjectStorageConfig) ToSecretKeySelector

func (osc *ObjectStorageConfig) ToSecretKeySelector() corev1.SecretKeySelector

type QueryFrontendSpec

type QueryFrontendSpec struct {
	CommonFields `json:",inline"`
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	Replicas int32 `json:"replicas,omitempty"`
	// CompressResponses enables response compression
	// +kubebuilder:default=true
	CompressResponses bool `json:"compressResponses,omitempty"`
	// By default, the operator will add the first discoverable Query API to the
	// Query Frontend, if they have query labels. You can optionally choose to override default
	// Query selector labels, to select a subset of QueryAPIs to query.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:={matchLabels:{"operator.thanos.io/query-api": "true"}}
	QueryLabelSelector *metav1.LabelSelector `json:"queryLabelSelector,omitempty"`
	// LogQueriesLongerThan sets the duration threshold for logging long queries
	// +kubebuilder:validation:Optional
	LogQueriesLongerThan *Duration `json:"logQueriesLongerThan,omitempty"`
	// QueryRangeResponseCacheConfig holds the configuration for the query range response cache
	// +kubebuilder:validation:Optional
	QueryRangeResponseCacheConfig *CacheConfig `json:"queryRangeResponseCacheConfig,omitempty"`
	// QueryRangeSplitInterval sets the split interval for query range
	// +kubebuilder:validation:Optional
	QueryRangeSplitInterval *Duration `json:"queryRangeSplitInterval,omitempty"`
	// LabelsSplitInterval sets the split interval for labels
	// +kubebuilder:validation:Optional
	LabelsSplitInterval *Duration `json:"labelsSplitInterval,omitempty"`
	// QueryRangeMaxRetries sets the maximum number of retries for query range requests
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:default=5
	QueryRangeMaxRetries int `json:"queryRangeMaxRetries,omitempty"`
	// LabelsMaxRetries sets the maximum number of retries for label requests
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:default=5
	LabelsMaxRetries int `json:"labelsMaxRetries,omitempty"`
	// LabelsDefaultTimeRange sets the default time range for label queries
	// +kubebuilder:validation:Optional
	LabelsDefaultTimeRange *Duration `json:"labelsDefaultTimeRange,omitempty"`
	// Additional configuration for the Thanos components
	Additional `json:",inline"`
}

QueryFrontendSpec defines the desired state of ThanosQueryFrontend

func (*QueryFrontendSpec) DeepCopy

func (in *QueryFrontendSpec) DeepCopy() *QueryFrontendSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueryFrontendSpec.

func (*QueryFrontendSpec) DeepCopyInto

func (in *QueryFrontendSpec) DeepCopyInto(out *QueryFrontendSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RetentionResolutionConfig

type RetentionResolutionConfig struct {
	// Raw is the retention configuration for the raw samples.
	// This configures how long to retain raw samples in the storage.
	// The default value is 0d, which means samples are retained indefinitely.
	// +kubebuilder:default="0d"
	// +kubebuilder:validation:Required
	Raw Duration `json:"raw,omitempty"`
	// FiveMinutes is the retention configuration for samples of resolution 1 (5 minutes).
	// This configures how long to retain samples of resolution 1 (5 minutes) in storage.
	// The default value is 0d, which means these samples are retained indefinitely.
	// +kubebuilder:default="0d"
	// +kubebuilder:validation:Required
	FiveMinutes Duration `json:"fiveMinutes,omitempty"`
	// OneHour is the retention configuration for samples of resolution 2 (1 hour).
	// This configures how long to retain samples of resolution 2 (1 hour) in storage.
	// The default value is 0d, which means these samples are retained indefinitely.
	// +kubebuilder:default="0d"
	// +kubebuilder:validation:Required
	OneHour Duration `json:"oneHour,omitempty"`
}

RetentionResolutionConfig defines the retention configuration for the compact component.

func (*RetentionResolutionConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetentionResolutionConfig.

func (*RetentionResolutionConfig) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouterSpec

type RouterSpec struct {
	// CommonFields are the options available to all Thanos components.
	// +kubebuilder:validation:Optional
	CommonFields `json:",inline"`
	// Labels are additional labels to add to the router components.
	// Labels set here will overwrite the labels inherited from the ThanosReceive object if they have the same key.
	// +kubebuilder:validation:Optional
	Labels map[string]string `json:"labels,omitempty"`
	// Replicas is the number of router replicas.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	// +kubebuilder:validation:Required
	Replicas int32 `json:"replicas,omitempty"`
	// ReplicationFactor is the replication factor for the router.
	// +kubebuilder:default=1
	// +kubebuilder:validation:Enum=1;3;5
	// +kubebuilder:validation:Required
	ReplicationFactor int32 `json:"replicationFactor,omitempty"`
	// ExternalLabels set and forwarded by the router to the ingesters.
	// +kubebuilder:default={receive: "true"}
	// +kubebuilder:validation:Required
	ExternalLabels ExternalLabels `json:"externalLabels,omitempty"`
	// Additional configuration for the Thanos components. Allows you to add
	// additional args, containers, volumes, and volume mounts to Thanos Deployments,
	// and StatefulSets. Ideal to use for things like sidecars.
	// +kubebuilder:validation:Optional
	Additional `json:",inline"`
}

RouterSpec represents the configuration for the router

func (*RouterSpec) DeepCopy

func (in *RouterSpec) DeepCopy() *RouterSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterSpec.

func (*RouterSpec) DeepCopyInto

func (in *RouterSpec) DeepCopyInto(out *RouterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceMonitorConfig

type ServiceMonitorConfig struct {
	// Enable the management of ServiceMonitors for the Thanos component.
	// If not specified, the operator will default to true.
	// +kubebuilder:validation:Optional
	Enable *bool `json:"enable,omitempty"`
	// Labels to add to the ServiceMonitor.
	// +kubebuilder:validation:Optional
	Labels map[string]string `json:"labels,omitempty"`
}

ServiceMonitorConfig is the configuration for the ServiceMonitor.

func (*ServiceMonitorConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitorConfig.

func (*ServiceMonitorConfig) DeepCopyInto

func (in *ServiceMonitorConfig) DeepCopyInto(out *ServiceMonitorConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ShardingConfig

type ShardingConfig struct {
	// ExternalLabelSharding is the sharding configuration based on explicit external labels and their values.
	// +kubebuilder:validation:Optional
	// +listType=map
	// +listMapKey=shardName
	ExternalLabelSharding []ExternalLabelShardingConfig `json:"externalLabelSharding,omitempty"`
}

ShardingConfig defines the sharding configuration for the compact component.

func (*ShardingConfig) DeepCopy

func (in *ShardingConfig) DeepCopy() *ShardingConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingConfig.

func (*ShardingConfig) DeepCopyInto

func (in *ShardingConfig) DeepCopyInto(out *ShardingConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ShardingStrategy

type ShardingStrategy struct {
	// Type here is the type of sharding strategy.
	// +kubebuilder:validation:Required
	// +kubebuilder:default="block"
	// +kubebuilder:validation:Enum=block
	Type ShardingStrategyType `json:"type,omitempty"`
	// Shards is the number of shards to split the data into.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	Shards int32 `json:"shards,omitempty"`
	// ReplicaPerShard is the number of replicas per shard.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	ShardReplicas int32 `json:"shardReplicas,omitempty"`
}

ShardingStrategy controls the automatic deployment of multiple store gateways sharded by block ID by hashmoding __block_id label value.

func (*ShardingStrategy) DeepCopy

func (in *ShardingStrategy) DeepCopy() *ShardingStrategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingStrategy.

func (*ShardingStrategy) DeepCopyInto

func (in *ShardingStrategy) DeepCopyInto(out *ShardingStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ShardingStrategyType

type ShardingStrategyType string
const (
	// Block is the block modulo sharding strategy for sharding Stores according to block ids.
	Block ShardingStrategyType = "block"
)

type StorageSize

type StorageSize string

StorageSize is the size of the PV storage to be used by a Thanos component. +kubebuilder:validation:Required +kubebuilder:validation:Pattern=`^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$`

func (StorageSize) ToResourceQuantity

func (s StorageSize) ToResourceQuantity() resource.Quantity

ToResourceQuantity converts a StorageSize to a resource.Quantity.

type TSDBConfig

type TSDBConfig struct {
	// Retention is the duration for which a particular TSDB will retain data.
	// +kubebuilder:default="2h"
	// +kubebuilder:validation:Required
	Retention Duration `json:"retention,omitempty"`
}

TSDBConfig specifies configuration for any particular Thanos TSDB. NOTE: Some of these options will not exist for all components, in which case, even if specified can be ignored.

func (*TSDBConfig) DeepCopy

func (in *TSDBConfig) DeepCopy() *TSDBConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TSDBConfig.

func (*TSDBConfig) DeepCopyInto

func (in *TSDBConfig) DeepCopyInto(out *TSDBConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThanosCompact

type ThanosCompact struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ThanosCompactSpec   `json:"spec,omitempty"`
	Status ThanosCompactStatus `json:"status,omitempty"`
}

ThanosCompact is the Schema for the thanoscompacts API

func (*ThanosCompact) DeepCopy

func (in *ThanosCompact) DeepCopy() *ThanosCompact

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosCompact.

func (*ThanosCompact) DeepCopyInto

func (in *ThanosCompact) DeepCopyInto(out *ThanosCompact)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThanosCompact) DeepCopyObject

func (in *ThanosCompact) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThanosCompactList

type ThanosCompactList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ThanosCompact `json:"items"`
}

ThanosCompactList contains a list of ThanosCompact

func (*ThanosCompactList) DeepCopy

func (in *ThanosCompactList) DeepCopy() *ThanosCompactList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosCompactList.

func (*ThanosCompactList) DeepCopyInto

func (in *ThanosCompactList) DeepCopyInto(out *ThanosCompactList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThanosCompactList) DeepCopyObject

func (in *ThanosCompactList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThanosCompactSpec

type ThanosCompactSpec struct {
	// CommonFields are the options available to all Thanos components.
	CommonFields `json:",inline"`
	// Labels are additional labels to add to the Compact component.
	// +kubebuilder:validation:Optional
	Labels map[string]string `json:"labels,omitempty"`
	// ObjectStorageConfig is the object storage configuration for the compact component.
	// +kubebuilder:validation:Required
	ObjectStorageConfig ObjectStorageConfig `json:"objectStorageConfig"`
	// StorageSize is the size of the storage to be used by the Thanos Compact StatefulSets.
	// +kubebuilder:validation:Required
	StorageSize StorageSize `json:"storageSize"`
	// RetentionConfig is the retention configuration for the compact component.
	// +kubebuilder:validation:Required
	RetentionConfig RetentionResolutionConfig `json:"retentionConfig,omitempty"`
	// BlockConfig defines settings for block handling.
	// +kubebuilder:validation:Optional
	BlockConfig *BlockConfig `json:"blockConfig,omitempty"`
	// ShardingConfig is the sharding configuration for the compact component.
	// +kubebuilder:validation:Optional
	ShardingConfig *ShardingConfig `json:"shardingConfig,omitempty"`
	// CompactConfig is the configuration for the compact component.
	// +kubebuilder:validation:Optional
	CompactConfig *CompactConfig `json:"compactConfig,omitempty"`
	// DownsamplingConfig is the downsampling configuration for the compact component.
	// +kubebuilder:validation:Optional
	DownsamplingConfig *DownsamplingConfig `json:"downsamplingConfig,omitempty"`
	// Minimum time range to serve. Any data earlier than this lower time range will be ignored.
	// If not set, will be set as zero value, so most recent blocks will be served.
	// +kubebuilder:validation:Optional
	MinTime *Duration `json:"minTime,omitempty"`
	// Maximum time range to serve. Any data after this upper time range will be ignored.
	// If not set, will be set as max value, so all blocks will be served.
	// +kubebuilder:validation:Optional
	MaxTime *Duration `json:"maxTime,omitempty"`
	// When a resource is paused, no actions except for deletion
	// will be performed on the underlying objects.
	// +kubebuilder:validation:Optional
	Paused *bool `json:"paused,omitempty"`
	// FeatureGates are feature gates for the compact component.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:={"serviceMonitor":{"enable":true}}
	FeatureGates *FeatureGates `json:"featureGates,omitempty"`
	// Additional configuration for the Thanos components. Allows you to add
	// additional args, containers, volumes, and volume mounts to Thanos Deployments,
	// and StatefulSets. Ideal to use for things like sidecars.
	// +kubebuilder:validation:Optional
	Additional `json:",inline"`
}

ThanosCompactSpec defines the desired state of ThanosCompact

func (*ThanosCompactSpec) DeepCopy

func (in *ThanosCompactSpec) DeepCopy() *ThanosCompactSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosCompactSpec.

func (*ThanosCompactSpec) DeepCopyInto

func (in *ThanosCompactSpec) DeepCopyInto(out *ThanosCompactSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThanosCompactStatus

type ThanosCompactStatus struct {
	// Conditions represent the latest available observations of the state of the hashring.
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

ThanosCompactStatus defines the observed state of ThanosCompact

func (*ThanosCompactStatus) DeepCopy

func (in *ThanosCompactStatus) DeepCopy() *ThanosCompactStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosCompactStatus.

func (*ThanosCompactStatus) DeepCopyInto

func (in *ThanosCompactStatus) DeepCopyInto(out *ThanosCompactStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThanosQuery

type ThanosQuery struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ThanosQuerySpec   `json:"spec,omitempty"`
	Status ThanosQueryStatus `json:"status,omitempty"`
}

ThanosQuery is the Schema for the thanosqueries API

func (*ThanosQuery) DeepCopy

func (in *ThanosQuery) DeepCopy() *ThanosQuery

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosQuery.

func (*ThanosQuery) DeepCopyInto

func (in *ThanosQuery) DeepCopyInto(out *ThanosQuery)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThanosQuery) DeepCopyObject

func (in *ThanosQuery) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThanosQueryList

type ThanosQueryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ThanosQuery `json:"items"`
}

ThanosQueryList contains a list of ThanosQuery

func (*ThanosQueryList) DeepCopy

func (in *ThanosQueryList) DeepCopy() *ThanosQueryList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosQueryList.

func (*ThanosQueryList) DeepCopyInto

func (in *ThanosQueryList) DeepCopyInto(out *ThanosQueryList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThanosQueryList) DeepCopyObject

func (in *ThanosQueryList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThanosQuerySpec

type ThanosQuerySpec struct {
	CommonFields `json:",inline"`
	// Replicas is the number of querier replicas.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	// +kubebuilder:validation:Required
	Replicas int32 `json:"replicas,omitempty"`
	// Labels are additional labels to add to the Querier component.
	// +kubebuilder:validation:Optional
	Labels map[string]string `json:"labels,omitempty"`
	// ReplicaLabels are labels to treat as a replica indicator along which data is deduplicated.
	// Data can still be queried without deduplication using 'dedup=false' parameter.
	// Data includes time series, recording rules, and alerting rules.
	// Refer to https://thanos.io/tip/components/query.md/#deduplication-replica-labels
	// +kubebuilder:default:={"replica"}
	// +kubebuilder:validation:Optional
	ReplicaLabels []string `json:"replicaLabels,omitempty"`
	// StoreLabelSelector enables adding additional labels to build a custom label selector
	// for discoverable StoreAPIs. Values provided here will be appended to the default which are
	// {"operator.thanos.io/store-api": "true", "app.kubernetes.io/part-of": "thanos"}.
	// +kubebuilder:validation:Optional
	StoreLabelSelector *metav1.LabelSelector `json:"customStoreLabelSelector,omitempty"`
	// QueryFrontend is the configuration for the Query Frontend
	// If you specify this, the operator will create a Query Frontend in front of your query deployment.
	// +kubebuilder:validation:Optional
	QueryFrontend *QueryFrontendSpec `json:"queryFrontend,omitempty"`
	// When a resource is paused, no actions except for deletion
	// will be performed on the underlying objects.
	// +kubebuilder:validation:Optional
	Paused *bool `json:"paused,omitempty"`
	// FeatureGates are feature gates for the compact component.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:={"serviceMonitor":{"enable":true}}
	FeatureGates *FeatureGates `json:"featureGates,omitempty"`
	// Additional configuration for the Thanos components. Allows you to add
	// additional args, containers, volumes, and volume mounts to Thanos Deployments,
	// and StatefulSets. Ideal to use for things like sidecars.
	// +kubebuilder:validation:Optional
	Additional `json:",inline"`
}

ThanosQuerySpec defines the desired state of ThanosQuery

func (*ThanosQuerySpec) DeepCopy

func (in *ThanosQuerySpec) DeepCopy() *ThanosQuerySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosQuerySpec.

func (*ThanosQuerySpec) DeepCopyInto

func (in *ThanosQuerySpec) DeepCopyInto(out *ThanosQuerySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThanosQueryStatus

type ThanosQueryStatus struct {
	// Conditions represent the latest available observations of the state of the Querier.
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

ThanosQueryStatus defines the observed state of ThanosQuery

func (*ThanosQueryStatus) DeepCopy

func (in *ThanosQueryStatus) DeepCopy() *ThanosQueryStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosQueryStatus.

func (*ThanosQueryStatus) DeepCopyInto

func (in *ThanosQueryStatus) DeepCopyInto(out *ThanosQueryStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThanosReceive

type ThanosReceive struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired state of ThanosReceive
	Spec ThanosReceiveSpec `json:"spec,omitempty"`
	// Status defines the observed state of ThanosReceive
	Status ThanosReceiveStatus `json:"status,omitempty"`
}

ThanosReceive is the Schema for the thanosreceives API

func (*ThanosReceive) DeepCopy

func (in *ThanosReceive) DeepCopy() *ThanosReceive

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosReceive.

func (*ThanosReceive) DeepCopyInto

func (in *ThanosReceive) DeepCopyInto(out *ThanosReceive)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThanosReceive) DeepCopyObject

func (in *ThanosReceive) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThanosReceiveList

type ThanosReceiveList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ThanosReceive `json:"items"`
}

ThanosReceiveList contains a list of ThanosReceive

func (*ThanosReceiveList) DeepCopy

func (in *ThanosReceiveList) DeepCopy() *ThanosReceiveList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosReceiveList.

func (*ThanosReceiveList) DeepCopyInto

func (in *ThanosReceiveList) DeepCopyInto(out *ThanosReceiveList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThanosReceiveList) DeepCopyObject

func (in *ThanosReceiveList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThanosReceiveSpec

type ThanosReceiveSpec struct {
	// Router is the configuration for the router.
	// +kubebuilder:validation:Required
	Router RouterSpec `json:"routerSpec,omitempty"`
	// Ingester is the configuration for the ingestor.
	// +kubebuilder:validation:Required
	Ingester IngesterSpec `json:"ingesterSpec,omitempty"`
	// When a resource is paused, no actions except for deletion
	// will be performed on the underlying objects.
	// +kubebuilder:validation:Optional
	Paused *bool `json:"paused,omitempty"`
	// FeatureGates are feature gates for the compact component.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:={"serviceMonitor":{"enable":true}}
	FeatureGates *FeatureGates `json:"featureGates,omitempty"`
}

ThanosReceiveSpec defines the desired state of ThanosReceive +kubebuilder:validation:XValidation:rule="self.ingesterSpec.hashrings.all(h, h.replicas >= self.routerSpec.replicationFactor )", message=" Ingester replicas must be greater than or equal to the Router replicas"

func (*ThanosReceiveSpec) DeepCopy

func (in *ThanosReceiveSpec) DeepCopy() *ThanosReceiveSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosReceiveSpec.

func (*ThanosReceiveSpec) DeepCopyInto

func (in *ThanosReceiveSpec) DeepCopyInto(out *ThanosReceiveSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThanosReceiveStatus

type ThanosReceiveStatus struct {
	// Conditions represent the latest available observations of the state of the hashring.
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

ThanosReceiveStatus defines the observed state of ThanosReceive

func (*ThanosReceiveStatus) DeepCopy

func (in *ThanosReceiveStatus) DeepCopy() *ThanosReceiveStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosReceiveStatus.

func (*ThanosReceiveStatus) DeepCopyInto

func (in *ThanosReceiveStatus) DeepCopyInto(out *ThanosReceiveStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThanosRuler

type ThanosRuler struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ThanosRulerSpec   `json:"spec,omitempty"`
	Status ThanosRulerStatus `json:"status,omitempty"`
}

ThanosRuler is the Schema for the thanosrulers API

func (*ThanosRuler) DeepCopy

func (in *ThanosRuler) DeepCopy() *ThanosRuler

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRuler.

func (*ThanosRuler) DeepCopyInto

func (in *ThanosRuler) DeepCopyInto(out *ThanosRuler)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThanosRuler) DeepCopyObject

func (in *ThanosRuler) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThanosRulerList

type ThanosRulerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ThanosRuler `json:"items"`
}

ThanosRulerList contains a list of ThanosRuler

func (*ThanosRulerList) DeepCopy

func (in *ThanosRulerList) DeepCopy() *ThanosRulerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRulerList.

func (*ThanosRulerList) DeepCopyInto

func (in *ThanosRulerList) DeepCopyInto(out *ThanosRulerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThanosRulerList) DeepCopyObject

func (in *ThanosRulerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThanosRulerSpec

type ThanosRulerSpec struct {
	CommonFields `json:",inline"`
	// Labels are additional labels to add to the Ruler component.
	// +kubebuilder:validation:Optional
	Labels map[string]string `json:"labels,omitempty"`
	// Replicas is the number of Ruler replicas.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	// +kubebuilder:validation:Required
	Replicas int32 `json:"replicas,omitempty"`
	// QueryLabelSelector is the label selector to discover Queriers.
	// It enables adding additional labels to build a custom label selector for discoverable QueryAPIs.
	// Values provided here will be appended to the default which are:
	// {"operator.thanos.io/query-api": "true", "app.kubernetes.io/part-of": "thanos"}.
	// +kubebuilder:validation:Optional
	QueryLabelSelector *metav1.LabelSelector `json:"queryLabelSelector,omitempty"`
	// ObjectStorageConfig is the secret that contains the object storage configuration for Ruler to upload blocks.
	// +kubebuilder:validation:Required
	ObjectStorageConfig ObjectStorageConfig `json:"defaultObjectStorageConfig,omitempty"`
	// RuleConfigSelector is the label selector to discover ConfigMaps with rule files.
	// It enables adding additional labels to build a custom label selector for discoverable rule files.
	// Values provided here will be appended to the default which is:
	// {"operator.thanos.io/rule-file": "true"}.
	RuleConfigSelector *metav1.LabelSelector `json:"ruleConfigSelector,omitempty"`
	// AlertmanagerURL is the URL of the Alertmanager to which the Ruler will send alerts.
	// The scheme should not be empty e.g http might be used. The scheme may be prefixed with
	// 'dns+' or 'dnssrv+' to detect Alertmanager IPs through respective DNS lookups.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^((dns\+)?(dnssrv\+)?(http|https):\/\/)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,}(:[0-9]{1,5})?$`
	AlertmanagerURL string `json:"alertmanagerURL,omitempty"`
	// ExternalLabels set on Ruler TSDB, for query time deduplication.
	// +kubebuilder:default={rule_replica: "$(NAME)"}
	// +kubebuilder:validation:Required
	ExternalLabels ExternalLabels `json:"externalLabels,omitempty"`
	// EvaluationInterval is the default interval at which rules are evaluated.
	// +kubebuilder:default="1m"
	EvaluationInterval Duration `json:"evaluationInterval,omitempty"`
	// Labels to drop before Ruler sends alerts to alertmanager.
	// +kubebuilder:validation:Optional
	AlertLabelDrop []string `json:"alertLabelDrop,omitempty"`
	// Retention is the duration for which the Thanos Rule StatefulSet will retain data.
	// +kubebuilder:default="2h"
	// +kubebuilder:validation:Required
	Retention Duration `json:"retention,omitempty"`
	// StorageSize is the size of the storage to be used by the Thanos Ruler StatefulSet.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=`^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$`
	StorageSize string `json:"storageSize"`
	// When a resource is paused, no actions except for deletion
	// will be performed on the underlying objects.
	// +kubebuilder:validation:Optional
	Paused *bool `json:"paused,omitempty"`
	// FeatureGates are feature gates for the rule component.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:={"serviceMonitor":{"enable":true}, "prometheusRuleEnabled":true}
	FeatureGates *FeatureGates `json:"featureGates,omitempty"`
	// PrometheusRuleSelector is the label selector to discover PrometheusRule CRDs.
	// Once detected, these rules are made into configmaps and added to the Ruler.
	// +kubebuilder:default:={matchLabels:{"operator.thanos.io/prometheus-rule": "true"}}
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:XValidation:rule="self.matchLabels.size() >= 1 || self.matchExpressions.size() >= 1",message="PrometheusRuleSelector must have at least one label selector"
	PrometheusRuleSelector metav1.LabelSelector `json:"prometheusRuleSelector,omitempty"`
	// Additional configuration for the Thanos components. Allows you to add
	// additional args, containers, volumes, and volume mounts to Thanos Deployments,
	// and StatefulSets. Ideal to use for things like sidecars.
	// +kubebuilder:validation:Optional
	Additional `json:",inline"`
}

ThanosRulerSpec defines the desired state of ThanosRuler

func (*ThanosRulerSpec) DeepCopy

func (in *ThanosRulerSpec) DeepCopy() *ThanosRulerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRulerSpec.

func (*ThanosRulerSpec) DeepCopyInto

func (in *ThanosRulerSpec) DeepCopyInto(out *ThanosRulerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThanosRulerStatus

type ThanosRulerStatus struct {
	// Conditions represent the latest available observations of the state of the Ruler.
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

ThanosRulerStatus defines the observed state of ThanosRuler

func (*ThanosRulerStatus) DeepCopy

func (in *ThanosRulerStatus) DeepCopy() *ThanosRulerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRulerStatus.

func (*ThanosRulerStatus) DeepCopyInto

func (in *ThanosRulerStatus) DeepCopyInto(out *ThanosRulerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThanosStore

type ThanosStore struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ThanosStoreSpec   `json:"spec,omitempty"`
	Status ThanosStoreStatus `json:"status,omitempty"`
}

ThanosStore is the Schema for the thanosstores API

func (*ThanosStore) DeepCopy

func (in *ThanosStore) DeepCopy() *ThanosStore

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosStore.

func (*ThanosStore) DeepCopyInto

func (in *ThanosStore) DeepCopyInto(out *ThanosStore)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThanosStore) DeepCopyObject

func (in *ThanosStore) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThanosStoreList

type ThanosStoreList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ThanosStore `json:"items"`
}

ThanosStoreList contains a list of ThanosStore

func (*ThanosStoreList) DeepCopy

func (in *ThanosStoreList) DeepCopy() *ThanosStoreList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosStoreList.

func (*ThanosStoreList) DeepCopyInto

func (in *ThanosStoreList) DeepCopyInto(out *ThanosStoreList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThanosStoreList) DeepCopyObject

func (in *ThanosStoreList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThanosStoreSpec

type ThanosStoreSpec struct {
	CommonFields `json:",inline"`
	// Labels are additional labels to add to the Store component.
	// +kubebuilder:validation:Optional
	Labels map[string]string `json:"labels,omitempty"`
	// ObjectStorageConfig is the secret that contains the object storage configuration for Store Gateways.
	// +kubebuilder:validation:Required
	ObjectStorageConfig ObjectStorageConfig `json:"objectStorageConfig,omitempty"`
	// StorageSize is the size of the storage to be used by the Thanos Store StatefulSets.
	// +kubebuilder:validation:Required
	StorageSize StorageSize `json:"storageSize"`
	// Duration after which the blocks marked for deletion will be filtered out while fetching blocks.
	// The idea of ignore-deletion-marks-delay is to ignore blocks that are marked for deletion with some delay.
	// This ensures store can still serve blocks that are meant to be deleted but do not have a replacement yet.
	// If delete-delay duration is provided to compactor or bucket verify component, it will upload deletion-mark.json
	// file to mark after what duration the block should be deleted rather than deleting the block straight away.
	// +kubebuilder:default="24h"
	IgnoreDeletionMarksDelay Duration `json:"ignoreDeletionMarksDelay,omitempty"`
	// IndexCacheConfig allows configuration of the index cache.
	// See format details: https://thanos.io/tip/components/store.md/#index-cache
	// +kubebuilder:validation:Optional
	IndexCacheConfig *CacheConfig `json:"indexCacheConfig,omitempty"`
	// CachingBucketConfig allows configuration of the caching bucket.
	// See format details: https://thanos.io/tip/components/store.md/#caching-bucket
	// +kubebuilder:validation:Optional
	CachingBucketConfig *CacheConfig `json:"cachingBucketConfig,omitempty"`
	// ShardingStrategy defines the sharding strategy for the Store Gateways across object storage blocks.
	// +kubebuilder:validation:Required
	ShardingStrategy ShardingStrategy `json:"shardingStrategy,omitempty"`
	// Minimum time range to serve. Any data earlier than this lower time range will be ignored.
	// If not set, will be set as zero value, so most recent blocks will be served.
	// +kubebuilder:validation:Optional
	MinTime *Duration `json:"minTime,omitempty"`
	// Maximum time range to serve. Any data after this upper time range will be ignored.
	// If not set, will be set as max value, so all blocks will be served.
	// +kubebuilder:validation:Optional
	MaxTime *Duration `json:"maxTime,omitempty"`
	// When a resource is paused, no actions except for deletion
	// will be performed on the underlying objects.
	// +kubebuilder:validation:Optional
	Paused *bool `json:"paused,omitempty"`
	// FeatureGates are feature gates for the compact component.
	// +kubebuilder:validation:Optional
	// +kubebuilder:default:={"serviceMonitor":{"enable":true}}
	FeatureGates *FeatureGates `json:"featureGates,omitempty"`
	// Additional configuration for the Thanos components. Allows you to add
	// additional args, containers, volumes, and volume mounts to Thanos Deployments,
	// and StatefulSets. Ideal to use for things like sidecars.
	// +kubebuilder:validation:Optional
	Additional `json:",inline"`
}

ThanosStoreSpec defines the desired state of ThanosStore

func (*ThanosStoreSpec) DeepCopy

func (in *ThanosStoreSpec) DeepCopy() *ThanosStoreSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosStoreSpec.

func (*ThanosStoreSpec) DeepCopyInto

func (in *ThanosStoreSpec) DeepCopyInto(out *ThanosStoreSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThanosStoreStatus

type ThanosStoreStatus struct {
	// Conditions represent the latest available observations of the state of the Querier.
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

ThanosStoreStatus defines the observed state of ThanosStore

func (*ThanosStoreStatus) DeepCopy

func (in *ThanosStoreStatus) DeepCopy() *ThanosStoreStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosStoreStatus.

func (*ThanosStoreStatus) DeepCopyInto

func (in *ThanosStoreStatus) DeepCopyInto(out *ThanosStoreStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL