k8smetadata

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sMetadataDecorator

type K8sMetadataDecorator struct {
	helper.TransformerOperator
	// contains filtered or unexported fields
}

K8sMetadataDecorator is an operator for decorating entries with kubernetes metadata

func (*K8sMetadataDecorator) Process

func (k *K8sMetadataDecorator) Process(ctx context.Context, entry *entry.Entry) error

Process will process an entry received by the k8s_metadata_decorator operator

func (*K8sMetadataDecorator) Start

func (k *K8sMetadataDecorator) Start() error

Start will start the k8s_metadata_decorator operator

type K8sMetadataDecoratorConfig

type K8sMetadataDecoratorConfig struct {
	helper.TransformerConfig `yaml:",inline"`
	PodNameField             entry.Field     `json:"pod_name_field,omitempty"  yaml:"pod_name_field,omitempty"`
	NamespaceField           entry.Field     `json:"namespace_field,omitempty" yaml:"namespace_field,omitempty"`
	CacheTTL                 helper.Duration `json:"cache_ttl,omitempty"       yaml:"cache_ttl,omitempty"`
	Timeout                  helper.Duration `json:"timeout,omitempty"         yaml:"timeout,omitempty"`
	AllowProxy               bool            `json:"allow_proxy,omitempty"     yaml:"allow_proxy,omitempty"`
}

K8sMetadataDecoratorConfig is the configuration of k8s_metadata_decorator operator

func NewK8sMetadataDecoratorConfig

func NewK8sMetadataDecoratorConfig(operatorID string) *K8sMetadataDecoratorConfig

NewK8sMetadataDecoratorConfig creates a new k8s metadata decorator config with default values

func (K8sMetadataDecoratorConfig) Build

Build will build a k8s_metadata_decorator operator from the supplied configuration

type MetadataCache

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

MetadataCache is a cache of kubernetes metadata

func (*MetadataCache) Load

func (m *MetadataCache) Load(key string) (MetadataCacheEntry, bool)

Load will return an entry stored in the metadata cache

func (*MetadataCache) Store

func (m *MetadataCache) Store(key string, entry MetadataCacheEntry)

Store will store an entry in the metadata cache

type MetadataCacheEntry

type MetadataCacheEntry struct {
	ClusterName    string
	UID            string
	ExpirationTime time.Time
	Labels         map[string]string
	Annotations    map[string]string

	AdditionalResourceValues map[string]string
}

MetadataCacheEntry is an entry in the metadata cache

Jump to

Keyboard shortcuts

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