helper

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MatchAllToken = "*"

Variables

This section is empty.

Functions

func ExtractContainerId

func ExtractContainerId(containerID string) string

func GenContainerStdoutLog added in v1.2.0

func GenContainerStdoutLog(podLogDirPrefix string, namespace string, podName string, podUID string, containerName string) []string

func GenTypePodSourceName added in v1.3.0

func GenTypePodSourceName(lgcNamespace string, podNamespace string, podName string, containerName string, sourceName string) string

func GetContainerIds added in v1.3.0

func GetContainerIds(pod *corev1.Pod) sets.String

func GetLogConfigRelatedPod

func GetLogConfigRelatedPod(lgc *logconfigv1beta1.LogConfig, podsLister corev1listers.PodLister) ([]*corev1.Pod, error)

func GetMatchedPodAnnotation

func GetMatchedPodAnnotation(annotationKeys []string, pod *corev1.Pod) map[string]string

func GetMatchedPodEnv

func GetMatchedPodEnv(envKeys []string, pod *corev1.Pod, containerName string) map[string]string

func GetMatchedPodLabel

func GetMatchedPodLabel(labelKeys []string, pod *corev1.Pod) map[string]string

func GetPathsFromSource added in v1.3.0

func GetPathsFromSource(src *source.Config) []string

func GetPathsFromSources added in v1.3.0

func GetPathsFromSources(src []*source.Config) []string

func GetPodRelatedLogConfigs

func GetPodRelatedLogConfigs(pod *corev1.Pod, lgcLister logconfigLister.LogConfigLister) ([]*logconfigv1beta1.LogConfig, error)

func GetTypePodOriginSourceName added in v1.3.0

func GetTypePodOriginSourceName(podSourceName string) string

func IsPodReady

func IsPodReady(pod *corev1.Pod) bool

func LabelsSubset

func LabelsSubset(i map[string]string, j map[string]string) bool

LabelsSubset checks if i is subset of j

func MatchStringMap added in v1.3.0

func MatchStringMap(new map[string]string, old map[string]string) bool

func MetaNamespaceKey

func MetaNamespaceKey(namespace string, name string) string

func PathEqual added in v1.2.4

func PathEqual(p1 string, p2 string) bool

PathEqual Compare whether the two paths are same, ignoring the suffix '/'

func PathsInNode

func PathsInNode(podLogDirPrefix string, kubeletRootDir string, rootFsCollectionEnabled bool, runtime runtime.Runtime,
	paths []string, pod *corev1.Pod, containerId string, containerName string) ([]string, error)

func Selector added in v1.4.0

func Selector(labelSelector map[string]string) (labels.Selector, error)

func SetPathsToSource added in v1.3.0

func SetPathsToSource(src *source.Config, paths []string)

func ToPipeline

func ToPipeline(lgc *logconfigv1beta1.LogConfig, sinkLister v1beta1.SinkLister, interceptorLister v1beta1.InterceptorLister) (*control.PipelineConfig, error)

func ToPipelineInterceptor

func ToPipelineInterceptor(interceptorsRaw string, interceptorRef string, interceptorLister v1beta1.InterceptorLister) ([]*interceptor.Config, error)

func ToPipelineSink

func ToPipelineSink(sinkRaw string, sinkRef string, sinkLister v1beta1.SinkLister) (*sink.Config, error)

func ToPipelineSources

func ToPipelineSources(sources string) ([]*source.Config, error)

Types

type FuncGetRelatedPod

type FuncGetRelatedPod func() ([]*corev1.Pod, error)

type Workload added in v1.3.0

type Workload struct {
	Kind string
	Name string
}

func GetWorkload added in v1.3.0

func GetWorkload(pod *corev1.Pod) Workload

Jump to

Keyboard shortcuts

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