helper

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 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 GetPodRelatedLogConfigs

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

TODO optimize the performance

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 MetaNamespaceKey

func MetaNamespaceKey(namespace string, name string) string

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 ToPipeline

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

func ToPipelineInterceptor

func ToPipelineInterceptor(interceptorsRaw string, interceptorRef string, interceptorLister v1beta1.InterceptorLister) ([]cfg.CommonCfg, error)

func ToPipelineSink

func ToPipelineSink(sinkRaw string, sinkRef string, sinkLister v1beta1.SinkLister) (cfg.CommonCfg, error)

func ToPipelineSources

func ToPipelineSources(sources string) ([]cfg.CommonCfg, error)

Types

type FuncGetRelatedPod

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

Jump to

Keyboard shortcuts

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