source

package
v1.63.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Exclude   []string `json:"exclude,omitempty"`
	Include   []string `json:"include,omitempty"`
	Delimiter string   `json:"line_delimiter,omitempty"`
	// contains filtered or unexported fields
}

File represents `file` vector source https://vector.dev/docs/reference/configuration/sources/file/

func NewFile

func NewFile(name string, spec v1alpha1.FileSpec) *File

func (*File) BuildSources

func (f *File) BuildSources() []apis.LogSource

func (File) GetName

func (cs File) GetName() string

type Kubernetes

type Kubernetes struct {
	// contains filtered or unexported fields
}

Kubernetes represents a source for collecting Kubernetes logs.

Because of how selectors work in Kubernetes, it is not possible to declare OR selector. The following selector `metadata.namespace=ns1,metadata.namespace=ns2` selects nothing, because namespace cannot be ns1 and ns2 at the same time.

Vector allows providing only a one node selector. Thus, the only way to collect logs from several namespaces is to render several `kubernetes_logs` sources for vector.

Kubernetes handles this logic on building sources and generates the config according to a single deckhouse resource. (ClusterLoggingConfig or PodLoggingConfig)

func NewKubernetes

func NewKubernetes(name string, spec v1alpha1.KubernetesPodsSpec, namespaced bool) *Kubernetes

func (*Kubernetes) BuildSources

func (k *Kubernetes) BuildSources() []apis.LogSource

BuildSources denormalizes sources for vector config, which can handle only one namespace per source (it is impossible to use OR clauses for the field-selector, so you can only select a single namespace)

func (Kubernetes) GetName

func (cs Kubernetes) GetName() string

type KubernetesAnnotationFields

type KubernetesAnnotationFields struct {
	ContainerImage string `json:"container_image,omitempty"`
	ContainerName  string `json:"container_name,omitempty"`
	PodIP          string `json:"pod_ip,omitempty"`
	PodLabels      string `json:"pod_labels,omitempty"`
	PodName        string `json:"pod_name,omitempty"`
	PodNamespace   string `json:"pod_namespace,omitempty"`
	PodNodeName    string `json:"pod_node_name,omitempty"`
	PodOwner       string `json:"pod_owner,omitempty"`
}

KubernetesAnnotationFields are supported fields for the following vector options https://vector.dev/docs/reference/configuration/sources/kubernetes_logs/#pod_annotation_fields

type NodeAnnotationFields added in v1.58.0

type NodeAnnotationFields struct {
	NodeLabels string `json:"node_labels,omitempty"`
}

Jump to

Keyboard shortcuts

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