v1alpha1

package
v1.44.4-tcs.4 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 2 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 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"`
}

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 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 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 KafkaSpec added in v1.39.0

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

	Topic string `json:"topic,omitempty"`

	TLS CommonTLSSpec `json:"tls,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 {
	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"`
}

type MultiLineParserType

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

type NamespaceSelector

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

	LabelSelector metav1.LabelSelector `json:"labelSelector,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"`
}

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