config

package
v0.27.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

+kubebuilder:validation:Optional

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentOTELConfig

type AgentOTELConfig struct {
	otelconfig.CommonOTELConfig `json:",inline"`
	// BatchPrerollup configures batch prerollup processor.
	BatchPrerollup BatchPrerollupConfig `json:"batch_prerollup"`
	// BatchPostrollup configures batch postrollup processor.
	BatchPostrollup BatchPostrollupConfig `json:"batch_postrollup"`
	// CustomMetrics configures custom metrics OTEL pipelines, which will send data to
	// the controller prometheus.
	// Key in this map refers to OTEL pipeline name. Prefixing pipeline name with `metrics/`
	// is optional, as all the components and pipeline names would be normalized.
	// By default `kubeletstats` custom metrics is added, which can be overwritten.
	CustomMetrics map[string]CustomMetricsConfig `json:"custom_metrics,omitempty"`
}

AgentOTELConfig is the configuration for Agent's OTEL collector. swagger:model +kubebuilder:object:generate=true

func (*AgentOTELConfig) DeepCopy

func (in *AgentOTELConfig) DeepCopy() *AgentOTELConfig

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

func (*AgentOTELConfig) DeepCopyInto

func (in *AgentOTELConfig) DeepCopyInto(out *AgentOTELConfig)

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

type BatchPostrollupConfig

type BatchPostrollupConfig struct {
	// Timeout sets the time after which a batch will be sent regardless of size.
	Timeout config.Duration `json:"timeout" validate:"gt=0" default:"1s"`

	// SendBatchSize is the size of a batch which after hit, will trigger it to be sent.
	SendBatchSize uint32 `json:"send_batch_size" validate:"gt=0" default:"100"`

	// SendBatchMaxSize is the upper limit of the batch size. Bigger batches will be split
	// into smaller units.
	SendBatchMaxSize uint32 `json:"send_batch_max_size" validate:"gte=0" default:"100"`
}

BatchPostrollupConfig defines configuration for OTEL batch processor. swagger:model +kubebuilder:object:generate=true

func (*BatchPostrollupConfig) DeepCopy

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

func (*BatchPostrollupConfig) DeepCopyInto

func (in *BatchPostrollupConfig) DeepCopyInto(out *BatchPostrollupConfig)

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

type BatchPrerollupConfig

type BatchPrerollupConfig struct {
	// Timeout sets the time after which a batch will be sent regardless of size.
	Timeout config.Duration `json:"timeout" validate:"gt=0" default:"10s"`

	// SendBatchSize is the size of a batch which after hit, will trigger it to be sent.
	SendBatchSize uint32 `json:"send_batch_size" validate:"gt=0" default:"10000"`

	// SendBatchMaxSize is the upper limit of the batch size. Bigger batches will be split
	// into smaller units.
	SendBatchMaxSize uint32 `json:"send_batch_max_size" validate:"gte=0" default:"10000"`
}

BatchPrerollupConfig defines configuration for OTEL batch processor. swagger:model +kubebuilder:object:generate=true

func (*BatchPrerollupConfig) DeepCopy

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

func (*BatchPrerollupConfig) DeepCopyInto

func (in *BatchPrerollupConfig) DeepCopyInto(out *BatchPrerollupConfig)

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

type Components

type Components map[string]any

Components is an alias type for map[string]any. This needs to be used because of the CRD requirements for the operator. https://github.com/kubernetes-sigs/controller-tools/issues/636 https://github.com/kubernetes-sigs/kubebuilder/issues/528 +kubebuilder:object:generate=false +kubebuilder:pruning:PreserveUnknownFields +kubebuilder:validation:Schemaless

func (*Components) DeepCopy

func (in *Components) DeepCopy() *Components

DeepCopy is an deepcopy function, copying the receiver, creating a new Components. We need to specify this manyually, as the generator does not support `any`.

func (*Components) DeepCopyInto

func (in *Components) DeepCopyInto(out *Components)

DeepCopyInto is an deepcopy function, copying the receiver, writing into out. In must be non-nil. We need to specify this manyually, as the generator does not support `any`.

type CustomMetricsConfig

type CustomMetricsConfig struct {
	// Receivers define receivers to be used in custom metrics pipelines. This should
	// be in OTEL format - https://opentelemetry.io/docs/collector/configuration/#receivers.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Receivers Components `json:"receivers"`
	// Processors define processors to be used in custom metrics pipelines. This should
	// be in OTEL format - https://opentelemetry.io/docs/collector/configuration/#processors.
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Processors Components `json:"processors"`
	// Pipeline is an OTEL metrics pipeline definition, which **only** uses receivers
	// and processors defined above. Exporter would be added automatically.
	Pipeline CustomMetricsPipelineConfig `json:"pipeline"`
}

CustomMetricsConfig defines receivers, processors and single metrics pipeline, which will be exported to the controller prometheus. swagger:model +kubebuilder:object:generate=true

func (*CustomMetricsConfig) DeepCopy

func (in *CustomMetricsConfig) DeepCopy() *CustomMetricsConfig

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

func (*CustomMetricsConfig) DeepCopyInto

func (in *CustomMetricsConfig) DeepCopyInto(out *CustomMetricsConfig)

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

type CustomMetricsPipelineConfig

type CustomMetricsPipelineConfig struct {
	Receivers  []string `json:"receivers"`
	Processors []string `json:"processors"`
}

CustomMetricsPipelineConfig defines a custom metrics pipeline. swagger:model +kubebuilder:object:generate=true

func (*CustomMetricsPipelineConfig) DeepCopy

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

func (*CustomMetricsPipelineConfig) DeepCopyInto

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