labelsfilter

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// LPCfgFileVersion represents the version of a Label Prefix Configuration File
	LPCfgFileVersion = 1
)

Variables

This section is empty.

Functions

func Filter

func Filter(lbls labels.Labels) (identityLabels, informationLabels labels.Labels)

Filter returns Labels from the given labels that have the same source and the same prefix as one of lpc valid prefixes, as well as labels that do not match the aforementioned filtering criteria.

func ParseLabelPrefixCfg

func ParseLabelPrefixCfg(prefixes []string, file string) error

ParseLabelPrefixCfg parses valid label prefixes from a file and from a slice of valid prefixes. Both are optional. If both are provided, both list are appended together.

Types

type LabelPrefix

type LabelPrefix struct {
	// Ignore if true will cause this prefix to be ignored insted of being accepted
	Ignore bool   `json:"invert"`
	Prefix string `json:"prefix"`
	Source string `json:"source"`
	// contains filtered or unexported fields
}

LabelPrefix is the cilium's representation of a container label. +k8s:deepcopy-gen=false +k8s:openapi-gen=false +deepequal-gen=false

func (LabelPrefix) String

func (p LabelPrefix) String() string

String returns a human readable representation of the LabelPrefix

Jump to

Keyboard shortcuts

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