v1alpha1

package
v1.59.8 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DestElasticsearch = "Elasticsearch"
	DestLogstash      = "Logstash"
	DestLoki          = "Loki"
	DestVector        = "Vector"
	DestKafka         = "Kafka"
	DestSplunk        = "Splunk"
)
View Source
const (
	SourceKubernetesPods = "KubernetesPods"
	SourceFile           = "File"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer added in v1.45.0

type Buffer struct {
	// The type of buffer to use.
	Type BufferType `json:"type,omitempty"`

	// Relevant when: type = "disk"
	Disk BufferDisk `json:"disk,omitempty"`

	// Relevant when: type = "memory"
	Memory BufferMemory `json:"memory,omitempty"`

	// Event handling behavior when a buffer is full.
	WhenFull BufferWhenFull `json:"whenFull,omitempty"`
}

type BufferDisk added in v1.45.0

type BufferDisk struct {
	// 	The maximum size of the buffer on disk.
	// Must be at least ~256 megabytes (268435488 bytes).
	MaxSize resource.Quantity `json:"maxSize,omitempty"`
}

type BufferMemory added in v1.45.0

type BufferMemory struct {
	// The maximum number of events allowed in the buffer.
	MaxEvents uint32 `json:"maxEvents,omitempty"`
}

type BufferType added in v1.45.0

type BufferType = string
const (
	// BufferTypeDisk specifies that events are buffered on disk.
	// This is less performant, but more durable. Data that has been synchronized to disk will not be lost if Vector is restarted forcefully or crashes.
	// Data is synchronized to disk every 500ms.
	BufferTypeDisk BufferType = "Disk"

	// BufferTypeMemory specifies that events are buffered in memory.
	// This is more performant, but less durable. Data will be lost if Vector is restarted forcefully or crashes.
	BufferTypeMemory BufferType = "Memory"
)

type BufferWhenFull added in v1.45.0

type BufferWhenFull = string
const (
	// BufferWhenFullDropNewest makes vector dropping the event instead of waiting for free space in buffer.
	// The event will be intentionally dropped. This mode is typically used when performance is the highest priority,
	// and it is preferable to temporarily lose events rather than cause a slowdown in the acceptance/consumption of events.
	BufferWhenFullDropNewest BufferWhenFull = "DropNewest"

	// BufferWhenFullBlock makes vector waiting for free space in the buffer.
	// This applies backpressure up the topology, signalling that sources should slow down the acceptance/consumption of events. This means that while no data is lost, data will pile up at the edge.
	BufferWhenFullBlock BufferWhenFull = "Block"
)

type ClusterLogDestination

type ClusterLogDestination struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a cluster log source.
	Spec ClusterLogDestinationSpec `json:"spec"`

	// Most recently observed status of a cluster log source.
	// Populated by the system.
	Status ClusterLogDestinationStatus `json:"status,omitempty"`
}

ClusterLogDestination specify output for logs stream

type ClusterLogDestinationSpec

type ClusterLogDestinationSpec struct {
	// Type of cluster log source: Loki, Elasticsearch, Logstash, Vector
	Type string `json:"type,omitempty"`

	// Loki describes spec for loki endpoint
	Loki LokiSpec `json:"loki"`

	// Elasticsearch spec for the Elasticsearch endpoint
	Elasticsearch ElasticsearchSpec `json:"elasticsearch"`

	// Logstash spec for the Logstash endpoint
	Logstash LogstashSpec `json:"logstash"`

	// Kafka spec for the Kafka endpoint
	Kafka KafkaSpec `json:"kafka"`

	// Splunk spec for the Splunk endpoint
	Splunk SplunkSpec `json:"splunk"`

	// Vector spec for the Vector endpoint
	Vector VectorSpec `json:"vector"`

	// Add extra labels for sources
	ExtraLabels map[string]string `json:"extraLabels,omitempty"`

	// Add rateLimit for sink
	RateLimit RateLimitSpec `json:"rateLimit,omitempty"`

	Buffer *Buffer `json:"buffer,omitempty"`
}

type ClusterLogDestinationStatus

type ClusterLogDestinationStatus struct {
}

type ClusterLoggingConfig

type ClusterLoggingConfig struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a cluster log source.
	Spec ClusterLoggingConfigSpec `json:"spec"`

	Status ClusterLoggingConfigStatus `json:"status,omitempty"`
}

ClusterLoggingConfig specify target for logs collecting

func NamespacedToCluster

func NamespacedToCluster(namespaced PodLoggingConfig) ClusterLoggingConfig

type ClusterLoggingConfigSpec

type ClusterLoggingConfigSpec struct {
	// Type of cluster log source: KubernetesPods, File
	Type string `json:"type,omitempty"`

	// KubernetesPods describes spec for kubernetes pod source
	KubernetesPods KubernetesPodsSpec `json:"kubernetesPods,omitempty"`

	// File describes spec for file source
	File FileSpec `json:"file,omitempty"`

	// Filters
	LogFilters   []Filter `json:"logFilter,omitempty"`
	LabelFilters []Filter `json:"labelFilter,omitempty"`

	// Multiline parsers
	MultiLineParser MultiLineParser `json:"multilineParser,omitempty"`

	// DestinationRefs slice of ClusterLogDestination names
	DestinationRefs []string `json:"destinationRefs,omitempty"`
}

type ClusterLoggingConfigStatus

type ClusterLoggingConfigStatus struct {
}

type CommonEncoding added in v1.54.0

type CommonEncoding struct {
	Codec EncodingCodec `json:"codec"`
}

type CommonTLSClientCert

type CommonTLSClientCert struct {
	CertFile string `json:"crtFile,omitempty"`
	KeyFile  string `json:"keyFile,omitempty"`
	KeyPass  string `json:"keyPass,omitempty"`
}

type CommonTLSSpec

type CommonTLSSpec struct {
	CommonTLSClientCert `json:"clientCrt,omitempty"`
	CAFile              string `json:"caFile,omitempty"`
	VerifyHostname      *bool  `json:"verifyHostname,omitempty"`
	VerifyCertificate   *bool  `json:"verifyCertificate,omitempty"`
}

type ElasticsearchAuthSpec

type ElasticsearchAuthSpec struct {
	Password      string `json:"password,omitempty"`
	Strategy      string `json:"strategy,omitempty"`
	User          string `json:"user,omitempty"`
	AwsAccessKey  string `json:"awsAccessKey,omitempty"`
	AwsSecretKey  string `json:"awsSecretAccessKey,omitempty"`
	AwsAssumeRole string `json:"awsAssumeRole,omitempty"`
	AwsRegion     string `json:"awsRegion,omitempty"`
}

type ElasticsearchSpec

type ElasticsearchSpec struct {
	Endpoint string `json:"endpoint,omitempty"`

	Index    string `json:"index,omitempty"`
	Pipeline string `json:"pipeline,omitempty"`
	Type     string `json:"type,omitempty"`

	Auth              ElasticsearchAuthSpec `json:"auth,omitempty"`
	DataStreamEnabled bool                  `json:"dataStreamEnabled"`
	DocType           string                `json:"docType"`

	TLS CommonTLSSpec `json:"tls,omitempty"`
}

type EncodingCodec added in v1.54.0

type EncodingCodec string
const (
	EncodingCodecText EncodingCodec = "TEXT"
	EncodingCodecCEF  EncodingCodec = "CEF"
	EncodingCodecJSON EncodingCodec = "JSON"
)

type FileSpec

type FileSpec struct {
	Include       []string `json:"include,omitempty"`
	Exclude       []string `json:"exclude,omitempty"`
	LineDelimiter string   `json:"lineDelimiter,omitempty"`
}

type Filter

type Filter struct {
	Field    string         `json:"field"`
	Operator FilterOperator `json:"operator"`
	Values   []interface{}  `json:"values,omitempty"`
}

type FilterOperator

type FilterOperator string
const (
	FilterOpIn           FilterOperator = "In"
	FilterOpNotIn        FilterOperator = "NotIn"
	FilterOpExists       FilterOperator = "Exists"
	FilterOpDoesNotExist FilterOperator = "DoesNotExist"
	FilterOpRegex        FilterOperator = "Regex"
	FilterOpNotRegex     FilterOperator = "NotRegex"
)

type KafkaSASL added in v1.53.0

type KafkaSASL struct {
	Username  string             `json:"username"`
	Password  string             `json:"password"`
	Mechanism KafkaSASLMechanism `json:"mechanism"`
}

type KafkaSASLMechanism added in v1.53.0

type KafkaSASLMechanism string
const (
	KafkaSASLMechanismPLAIN  KafkaSASLMechanism = "PLAIN"
	KafkaSASLMechanismSHA256 KafkaSASLMechanism = "SCRAM-SHA-256"
	KafkaSASLMechanismSHA512 KafkaSASLMechanism = "SCRAM-SHA-512"
)

type KafkaSpec added in v1.39.0

type KafkaSpec struct {
	BootstrapServers []string `json:"bootstrapServers,omitempty"`

	Topic    string        `json:"topic,omitempty"`
	KeyField string        `json:"keyField,omitempty"`
	TLS      CommonTLSSpec `json:"tls,omitempty"`

	SASL KafkaSASL `json:"sasl,omitempty"`

	Encoding CommonEncoding `json:"encoding,omitempty"`
}

type KubernetesPodsSpec

type KubernetesPodsSpec struct {
	NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"`

	LabelSelector metav1.LabelSelector `json:"labelSelector,omitempty"`
}

type LogstashSpec

type LogstashSpec struct {
	Endpoint string `json:"endpoint,omitempty"`

	TLS CommonTLSSpec `json:"tls,omitempty"`
}

type LokiAuthSpec

type LokiAuthSpec struct {
	Password string `json:"password,omitempty"`
	Strategy string `json:"strategy,omitempty"`
	Token    string `json:"token,omitempty"`
	User     string `json:"user,omitempty"`
}

type LokiSpec

type LokiSpec struct {
	// TenantID is used only for GrafanaCloud. When running Loki locally, a tenant ID is not required.
	TenantID string `json:"tenantID,omitempty"`

	Endpoint string `json:"endpoint,omitempty"`

	Auth LokiAuthSpec `json:"auth,omitempty"`

	TLS CommonTLSSpec `json:"tls,omitempty"`
}

type MultiLineParser

type MultiLineParser struct {
	Type   MultiLineParserType   `json:"type,omitempty"`
	Custom MultilineParserCustom `json:"custom,omitempty"`
}

type MultiLineParserType

type MultiLineParserType string
const (
	MultiLineParserNone          MultiLineParserType = "None"
	MultiLineParserGeneral       MultiLineParserType = "General"
	MultiLineParserBackslash     MultiLineParserType = "Backslash"
	MultiLineParserLogWithTime   MultiLineParserType = "LogWithTime"
	MultiLineParserMultilineJSON MultiLineParserType = "MultilineJSON"
	MultiLineParserCustom        MultiLineParserType = "Custom"
)

type MultilineParserCustom added in v1.45.0

type MultilineParserCustom struct {
	StartsWhen *ParserRegex `json:"startsWhen,omitempty"`
	EndsWhen   *ParserRegex `json:"endsWhen,omitempty"`
}

type NamespaceSelector

type NamespaceSelector struct {
	MatchNames   []string `json:"matchNames"`
	ExcludeNames []string `json:"excludeNames"`

	LabelSelector metav1.LabelSelector `json:"labelSelector,omitempty"`
}

type ParserRegex added in v1.45.0

type ParserRegex struct {
	Regex    *string `json:"regex,omitempty"`
	NotRegex *string `json:"notRegex,omitempty"`
}

type PodLoggingConfig

type PodLoggingConfig struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a namespaced log source.
	Spec PodLoggingConfigSpec `json:"spec"`

	// Most recently observed status of a namespaced log source.
	Status PodLoggingConfigStatus `json:"status,omitempty"`
}

PodLoggingConfig specify target for kubernetes pods logs collecting in specified namespace

type PodLoggingConfigSpec

type PodLoggingConfigSpec struct {
	// LabelSelector filter pods by label
	LabelSelector metav1.LabelSelector `json:"labelSelector,omitempty"`

	// Filters
	LogFilters   []Filter `json:"logFilter,omitempty"`
	LabelFilters []Filter `json:"labelFilter,omitempty"`

	// Multiline parsers
	MultiLineParser MultiLineParser `json:"multilineParser,omitempty"`

	// ClusterDestinationRefs slice of ClusterLogDestination names
	ClusterDestinationRefs []string `json:"clusterDestinationRefs,omitempty"`
}

type PodLoggingConfigStatus

type PodLoggingConfigStatus struct {
}

type RateLimitSpec

type RateLimitSpec struct {
	LinesPerMinute *int32   `json:"linesPerMinute,omitempty"`
	KeyField       string   `json:"keyField,omitempty"`
	Excludes       []Filter `json:"excludes,omitempty"`
}

RateLimitSpec is throttle-transform configuration.

type SplunkSpec added in v1.42.0

type SplunkSpec struct {
	Endpoint string `json:"endpoint,omitempty"`

	Token string `json:"token,omitempty"`

	Index string `json:"index,omitempty"`

	TLS CommonTLSSpec `json:"tls,omitempty"`
}

type VectorSpec

type VectorSpec struct {
	Endpoint string `json:"endpoint,omitempty"`

	TLS CommonTLSSpec `json:"tls,omitempty"`
}

Jump to

Keyboard shortcuts

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